fiexed bug

This commit is contained in:
jiaming743 2019-01-09 18:42:51 +08:00
parent 84e5fb7f73
commit 6b0268cc30
1 changed files with 7 additions and 1 deletions

View File

@ -49,6 +49,8 @@ export default {
container: '', container: '',
containerWH: [], containerWH: [],
animationHandler: '',
defaultRowNum: 5, defaultRowNum: 5,
defaultTitleBG: '#00BAFF', defaultTitleBG: '#00BAFF',
defaultOddBG: '#003B51', defaultOddBG: '#003B51',
@ -82,12 +84,14 @@ export default {
}, },
methods: { methods: {
init () { init () {
const { data, initDom, dealData, calcConfig, getCurrentScrollData } = this const { data, initDom, stopAnimation, dealData, calcConfig, getCurrentScrollData } = this
initDom() initDom()
if (!data) return if (!data) return
stopAnimation()
dealData() dealData()
calcConfig() calcConfig()
@ -242,6 +246,8 @@ export default {
stopAnimation () { stopAnimation () {
const { animationHandler } = this const { animationHandler } = this
if (!animationHandler) return
clearTimeout(animationHandler) clearTimeout(animationHandler)
} }
}, },