--fix bug 重复数据

This commit is contained in:
yuping
2023-03-18 13:15:58 +08:00
parent 38efcd780c
commit 7e391e6145
12 changed files with 184 additions and 181 deletions

View File

@@ -19,6 +19,16 @@ export function useInterval(fun, time) {
return { start };
}
export function useResetRef(initValue) {
const valueRef = ref(initValue);
function reset() {
valueRef.value = initValue;
}
return Object.assign(valueRef, { reset });
}
export function useTimeout(asyncFun, time) {
const timer = ref();
const maxCount = ref(0);