v
This commit is contained in:
@@ -565,18 +565,14 @@ export default defineComponent({
|
||||
createTimer() {
|
||||
this.timer = setInterval(() => {
|
||||
this.time--;
|
||||
if (!this.time) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
if (this.time <= 0) this.clearTimer(0);
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
//清除定时器
|
||||
clearTimer() {
|
||||
this.time = 60;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
clearTimer(time?: number) {
|
||||
this.time = time == undefined ? 60 : time;
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
},
|
||||
|
||||
//跳转到首页
|
||||
|
||||
@@ -565,18 +565,14 @@ export default defineComponent({
|
||||
createTimer() {
|
||||
this.timer = setInterval(() => {
|
||||
this.time--;
|
||||
if (!this.time) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
if (this.time <= 0) this.clearTimer(0);
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
//清除定时器
|
||||
clearTimer() {
|
||||
this.time = 60;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
clearTimer(time?: number) {
|
||||
this.time = time == undefined ? 60 : time;
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
},
|
||||
|
||||
//跳转到首页
|
||||
|
||||
@@ -563,22 +563,18 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
|
||||
//创建定时器
|
||||
//创建定时器
|
||||
createTimer() {
|
||||
this.timer = setInterval(() => {
|
||||
this.time--;
|
||||
if (!this.time) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
if (this.time <= 0) this.clearTimer(0);
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
//清除定时器
|
||||
clearTimer() {
|
||||
this.time = 60;
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
clearTimer(time?: number) {
|
||||
this.time = time == undefined ? 60 : time;
|
||||
if (this.timer) clearInterval(this.timer);
|
||||
},
|
||||
|
||||
//跳转到首页
|
||||
|
||||
Reference in New Issue
Block a user