|
|
@ -169,22 +169,6 @@ export default { |
|
|
|
this.timer = null |
|
|
|
this.timeTicket = null |
|
|
|
}, |
|
|
|
// startScrolling() { |
|
|
|
// this.timer = setInterval(() => { |
|
|
|
// this.position -= this.speed |
|
|
|
// // 当文字完全滚出容器时,重置位置 |
|
|
|
// // const containerHeight = document.getElementsByClassName('scroll-container')[0].offsetHeight |
|
|
|
// this.$nextTick(() => { |
|
|
|
// const containerHeight = this.$refs.scrollInfo.offsetHeight |
|
|
|
// const contentHeight = this.$refs.marquee.offsetHeight |
|
|
|
// if (contentHeight <= containerHeight) { |
|
|
|
// this.position = 20 |
|
|
|
// } else if (Math.abs(this.position) >= contentHeight) { |
|
|
|
// this.position = containerHeight |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, 120) |
|
|
|
// }, |
|
|
|
startScrolling() { |
|
|
|
this.$nextTick(() => { |
|
|
|
const containerHeight = this.$refs.scrollInfo.offsetHeight |
|
|
|