mirror of
https://github.com/youzan/vant.git
synced 2026-03-06 02:06:58 +08:00
fix: delay might be undefined
This commit is contained in:
@@ -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);
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user