首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
Brain777
›
全部回复第 1 页 / 共 1 页
回复总数
3
5 天前
回复了
rookie2luochao
创建的主题
›
程序员
›
v 友们帮忙看看这段我几年前写的 定时刷新 token 的 js 代码,为什么会内存泄露?
const sub = timer(expiresIn * 1000).subscribe(() => {
refreshTokenRequest({ refreshToken: refresh_token });
// 感觉应该需要在刷新之后清理定时器订阅
sub.unsubscribe();
});
106 天前
回复了
semxau789
创建的主题
›
问与答
›
给六年级的小学生送什么好
乐高 法拉利
154 天前
回复了
tlerbao
创建的主题
›
程序员
›
封装 el-date-picker 不可以使用 :modelValue="modelValue"做双向绑定吗
// 调用
<DataRange v-model="date_range" />
// 二次封装的 DateRange 组件
<template>
<el-date-picker
v-model="date"/>
</template>
<script setup lang="ts">
interface Props {
modelValue: string | Date;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: "",
});
const emit = defineEmits(["update:modelValue"]);
const date = ref<string | Date>("")
watch(date,(value) => emit("update:modelValue", value))
</script>
可以这样写
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
2190 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms ·
UTC 06:10
·
PVG 14:10
·
LAX 23:10
·
JFK 02:10
Developed with
CodeLauncher
♥ Do have faith in what you're doing.