From 6b0268cc30e12b82058a9285a8cc82b4a9c86f3e Mon Sep 17 00:00:00 2001 From: jiaming743 <743192023@qq.com> Date: Wed, 9 Jan 2019 18:42:51 +0800 Subject: [PATCH] fiexed bug --- src/components/scrollBoard/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) } },