diff --git a/src/notice-bar/index.js b/src/notice-bar/index.js index 2f258cdcf..902d65968 100644 --- a/src/notice-bar/index.js +++ b/src/notice-bar/index.js @@ -37,10 +37,9 @@ export default createComponent({ }, watch: { + scrollable: 'start', text: { - handler() { - this.start(); - }, + handler: 'start', immediate: true, }, }, @@ -69,7 +68,7 @@ export default createComponent({ this.duration = 0; }, - start(){ + start() { this.$nextTick(() => { const { wrap, content } = this.$refs; if (!wrap || !content) { @@ -87,7 +86,7 @@ export default createComponent({ this.reset(); } }); - } + }, }, render() {