mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(hooks): 重构hook函数取消监听方式
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed, onScopeDispose, ref } from 'vue';
|
||||
import { useBoolean } from '../common';
|
||||
|
||||
/**
|
||||
@ -42,6 +42,8 @@ export default function useCountDown(second: number) {
|
||||
counts.value = 0;
|
||||
}
|
||||
|
||||
onScopeDispose(stop);
|
||||
|
||||
return {
|
||||
counts,
|
||||
isCounting,
|
||||
|
Reference in New Issue
Block a user