mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-26 11:36:33 +08:00
修复 Toptips 在控制台的报错 (#114)
This commit is contained in:
parent
b9bfac3d5b
commit
3b9b75c9a7
@ -4,7 +4,7 @@ module.exports = {
|
|||||||
// 如果已经有一个计时器在了,就清理掉先
|
// 如果已经有一个计时器在了,就清理掉先
|
||||||
if (zanTopTips.timer) {
|
if (zanTopTips.timer) {
|
||||||
clearTimeout(zanTopTips.timer);
|
clearTimeout(zanTopTips.timer);
|
||||||
zanTopTips.timer = undefined;
|
zanTopTips.timer = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof options === 'number') {
|
if (typeof options === 'number') {
|
||||||
@ -22,7 +22,7 @@ module.exports = {
|
|||||||
let timer = setTimeout(() => {
|
let timer = setTimeout(() => {
|
||||||
this.setData({
|
this.setData({
|
||||||
'zanTopTips.show': false,
|
'zanTopTips.show': false,
|
||||||
'zanTopTips.timer': undefined
|
'zanTopTips.timer': -1
|
||||||
});
|
});
|
||||||
}, options.duration);
|
}, options.duration);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user