|
|
@ -95,20 +95,36 @@ export default { |
|
|
|
this.videoStatus = 'end' |
|
|
|
}, |
|
|
|
// 文字滚动效果 |
|
|
|
textScroll () { |
|
|
|
// textScroll () { |
|
|
|
// this.textScrollId = setTimeout(() => { |
|
|
|
// this.textScroll() |
|
|
|
// }, 40) |
|
|
|
// this.$nextTick(() => { |
|
|
|
// if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) { |
|
|
|
// this.scrollViewTop -= 1 |
|
|
|
// } else { |
|
|
|
// clearTimeout(this.textScrollId) |
|
|
|
// this.scrollViewTop = 0 |
|
|
|
// this.textScroll() |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
textScroll() { |
|
|
|
this.textScrollId = setTimeout(() => { |
|
|
|
this.textScroll() |
|
|
|
}, 40) |
|
|
|
this.$nextTick(() => { |
|
|
|
if (this.scrollViewTop >= -this.$refs['para-container'].children[0].children[0].offsetHeight) { |
|
|
|
this.scrollViewTop -= 1 |
|
|
|
this.scrollViewTop -= 1; |
|
|
|
this.textScroll(); // 递归调用 |
|
|
|
} else { |
|
|
|
clearTimeout(this.textScrollId) |
|
|
|
this.scrollViewTop = 0 |
|
|
|
this.textScroll() |
|
|
|
} |
|
|
|
}) |
|
|
|
clearTimeout(this.textScrollId); |
|
|
|
this.scrollViewTop = 0; |
|
|
|
// 继续递归调用 |
|
|
|
this.textScroll(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, 40); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|