提交 18f7fc6e 编写于 作者: D dolymood

refactor(picker): remove usless code

上级 47c7554d
......@@ -241,10 +241,9 @@
swipeTime: this.swipeTime,
observeDOM: false
})
wheel._cube_scrollEnd = () => {
wheel.on('scrollEnd', () => {
this.$emit(EVENT_CHANGE, i, wheel.getSelectedIndex())
}
wheel.on('scrollEnd', wheel._cube_scrollEnd)
})
} else {
this.wheels[i].refresh()
}
......@@ -255,9 +254,7 @@
if (this.wheels.length > dataLength) {
const extraWheels = this.wheels.splice(dataLength)
extraWheels.forEach((wheel) => {
wheel.off('scrollEnd', wheel._cube_scrollEnd)
wheel.destroy()
wheel._cube_scrollEnd = null
})
}
},
......@@ -269,9 +266,7 @@
},
beforeDestroy() {
this.wheels && this.wheels.forEach((wheel) => {
wheel.off('scrollEnd', wheel._cube_scrollEnd)
wheel.destroy()
wheel._cube_scrollEnd = null
})
this.wheels = null
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册