提交 2ca38b79 编写于 作者: D dolymood

refactor(picker): selectedIndex computed logic

上级 66757b88
......@@ -236,12 +236,12 @@
useTransition: USE_TRANSITION
})
wheel.on('scrollEnd', () => {
const y = wheel.y
let selectedIndex
if (USE_TRANSITION) {
selectedIndex = wheel.getSelectedIndex()
} else {
// fixed BScroll not calculating selectedIndex when setting useTransition to false
const y = wheel.y
if (y > wheel.minScrollY) {
selectedIndex = 0
} else if (y < wheel.maxScrollY) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册