diff --git a/packages/notice-bar/index.ts b/packages/notice-bar/index.ts index cf4d2854..fbb57825 100644 --- a/packages/notice-bar/index.ts +++ b/packages/notice-bar/index.ts @@ -91,19 +91,19 @@ VantComponent({ delay, }); - this.scroll(); + this.scroll(true); } }); }); }, - scroll() { + scroll(isInit = false) { this.timer && clearTimeout(this.timer); this.timer = null; this.setData({ animationData: this.resetAnimation - .translateX(this.wrapWidth) + .translateX(isInit ? 0 : this.wrapWidth) .step() .export(), });