NoticeBar: improve test coverage

This commit is contained in:
陈嘉涵
2017-08-28 14:40:00 +08:00
parent c357dd4e71
commit 561821d03a
4 changed files with 23 additions and 8 deletions

View File

@@ -70,7 +70,7 @@ export default {
const wrapWidth = this.$refs.contentWrap.getBoundingClientRect().width;
if (this.scrollable && offsetWidth > wrapWidth) {
this.offsetWidth = offsetWidth;
this.duration = Math.ceil((offsetWidth + wrapWidth) / this.speed);
this.duration = (offsetWidth + wrapWidth) / this.speed;
}
},