mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 19:06:45 +08:00
--fix bug 重复数据
This commit is contained in:
@@ -19,11 +19,11 @@ export function useInterval(fun, time) {
|
||||
return { start };
|
||||
}
|
||||
|
||||
export function useResetRef(initValue) {
|
||||
const valueRef = ref(initValue);
|
||||
export function useResetRef(initValue = {}) {
|
||||
const valueRef = ref({ ...initValue });
|
||||
|
||||
function reset() {
|
||||
valueRef.value = initValue;
|
||||
function reset(v = {}) {
|
||||
valueRef.value = { ...initValue, ...v };
|
||||
}
|
||||
|
||||
return Object.assign(valueRef, { reset });
|
||||
|
||||
Reference in New Issue
Block a user