mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(CountDown): destroy timer when Component destroyed (#2199)
This commit is contained in:
parent
dd44c3be0a
commit
7be1e4ac6e
@ -28,6 +28,11 @@ VantComponent({
|
|||||||
formattedTime: '0'
|
formattedTime: '0'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
destroyed() {
|
||||||
|
clearTimeout(this.tid);
|
||||||
|
this.tid = null;
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 开始
|
// 开始
|
||||||
start() {
|
start() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user