[bugfix] NoticeBar: 修复动画播放异常的问题 (#155)

* 修复 NoticeBar 展示问题

* remove console.log
This commit is contained in:
Yao 2018-03-23 10:33:44 +08:00 committed by GitHub
parent f5b250b0f1
commit f67af0614a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
})
}
};