mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix: delay might be undefined
This commit is contained in:
parent
d21420b7d2
commit
8ec96da204
@ -1,4 +1,4 @@
|
||||
import { createNamespace } from '../utils';
|
||||
import { createNamespace, isDef } from '../utils';
|
||||
import { doubleRaf } from '../utils/dom/raf';
|
||||
import Icon from '../icon';
|
||||
|
||||
@ -75,6 +75,8 @@ export default createComponent({
|
||||
},
|
||||
|
||||
start() {
|
||||
const delay = isDef(this.delay) ? this.delay * 1000 : 0;
|
||||
|
||||
this.reset();
|
||||
|
||||
setTimeout(() => {
|
||||
@ -94,7 +96,7 @@ export default createComponent({
|
||||
this.contentWidth = contentWidth;
|
||||
});
|
||||
}
|
||||
}, this.delay * 1000);
|
||||
}, delay);
|
||||
},
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user