From d68943cd7337aed0f6feba6317e292981cec3ae5 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 30 Apr 2020 17:39:34 +0800 Subject: [PATCH] fix(NoticeBar): allow dynamic setting of scrollable (#6190) --- src/notice-bar/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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() {