bug修复
This commit is contained in:
@@ -96,8 +96,12 @@ const resetTimer = (count) => {
|
||||
watch(
|
||||
() => props.start,
|
||||
(newVal) => {
|
||||
if (newVal) resetTimer(props.total);
|
||||
else if (timer.value) clearInterval(timer.value);
|
||||
if (newVal) {
|
||||
resetTimer(props.total);
|
||||
} else {
|
||||
remain.value = 0;
|
||||
clearInterval(timer.value);
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
|
||||
Reference in New Issue
Block a user