提交 e8bfa48e 编写于 作者: D DCloud_LXH

fix: picker-view-column event.detail

上级 14800707
...@@ -85,12 +85,14 @@ export default defineComponent({ ...@@ -85,12 +85,14 @@ export default defineComponent({
} }
} }
const onScrollend = (event: { const onScrollend = (event: {
contentOffset: { x: number; y: number } detail: {
contentOffset: { x: number; y: number }
}
}) => { }) => {
if (Date.now() - scrollToElementTime < 340) { if (Date.now() - scrollToElementTime < 340) {
return return
} }
const y = event.contentOffset.y const y = event.detail.contentOffset.y
const _current = Math.round(y / indicatorHeight.value) const _current = Math.round(y / indicatorHeight.value)
if (y % indicatorHeight.value) { if (y % indicatorHeight.value) {
setCurrent(_current, true, true) setCurrent(_current, true, true)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册