diff --git a/src/components/scrollBoard/index.vue b/src/components/scrollBoard/index.vue index 971a949..d3a7f15 100644 --- a/src/components/scrollBoard/index.vue +++ b/src/components/scrollBoard/index.vue @@ -49,6 +49,8 @@ export default { container: '', containerWH: [], + animationHandler: '', + defaultRowNum: 5, defaultTitleBG: '#00BAFF', defaultOddBG: '#003B51', @@ -82,12 +84,14 @@ export default { }, methods: { init () { - const { data, initDom, dealData, calcConfig, getCurrentScrollData } = this + const { data, initDom, stopAnimation, dealData, calcConfig, getCurrentScrollData } = this initDom() if (!data) return + stopAnimation() + dealData() calcConfig() @@ -242,6 +246,8 @@ export default { stopAnimation () { const { animationHandler } = this + if (!animationHandler) return + clearTimeout(animationHandler) } },