mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] NoticeBar: 修复动画播放异常的问题 (#155)
* 修复 NoticeBar 展示问题 * remove console.log
This commit is contained in:
parent
f5b250b0f1
commit
f67af0614a
@ -28,6 +28,8 @@ const ZanNoticeBar = {
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(this.data[componentId].setTimeoutId)
|
||||
|
||||
currentComponent.wrapWidth = rect.width;
|
||||
if (currentComponent.wrapWidth < currentComponent.width) {
|
||||
var mstime = currentComponent.width / 40 * 1000;
|
||||
@ -60,9 +62,12 @@ const ZanNoticeBar = {
|
||||
});
|
||||
}, 100);
|
||||
|
||||
setTimeout(() => {
|
||||
const setTimeoutId = setTimeout(() => {
|
||||
this.scrollZanNoticeBar(componentId, mstime);
|
||||
}, mstime);
|
||||
this.setData({
|
||||
[`${componentId}.setTimeoutId`]: setTimeoutId
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user