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 { doubleRaf } from '../utils/dom/raf';
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
|
|
||||||
@@ -75,6 +75,8 @@ export default createComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
const delay = isDef(this.delay) ? this.delay * 1000 : 0;
|
||||||
|
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -94,7 +96,7 @@ export default createComponent({
|
|||||||
this.contentWidth = contentWidth;
|
this.contentWidth = contentWidth;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, this.delay * 1000);
|
}, delay);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user