未验证 提交 e4c34a07 编写于 作者: 拧巴的猫 提交者: GitHub

fix(picker): 修复taro版本滚动报错问题 (#852)

上级 13468e8c
......@@ -8,6 +8,7 @@ import React, {
import { PickerOption } from './picker.taro'
import { useTouch } from '../../utils/useTouch'
import { getRectByTaro } from '@/utils/useClientRect'
import { passiveSupported } from '@/utils/supports-passive'
interface PickerSlotProps {
keyIndex?: number
......@@ -211,7 +212,10 @@ const InternalPickerSlot: ForwardRefRenderFunction<
isStopPropagation?: boolean
) => {
/* istanbul ignore else */
if (typeof event.cancelable !== 'boolean' || event.cancelable) {
if (
!passiveSupported &&
(typeof event.cancelable !== 'boolean' || event.cancelable)
) {
event.preventDefault()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册