未验证 提交 4d5891cc 编写于 作者: X xianyu 提交者: GitHub

fix: picker 组件在小程序端触发滚动后,页面(有滚动条的情况下)也一起滚动 (#829)

上级 ea636ff0
......@@ -5,6 +5,7 @@ import React, {
RefObject,
ForwardRefRenderFunction,
} from 'react'
import { View } from '@tarojs/components'
import Popup from '@/packages/popup/index.taro'
import PickerSlot from './pickerSlot.taro'
import useRefs from '@/utils/useRefs'
......@@ -287,7 +288,12 @@ const InternalPicker: ForwardRefRenderFunction<unknown, Partial<PickerProps>> =
closeActionSheet()
}}
>
<div className={`${b()} ${className || ''}`} style={style} {...rest}>
<View
className={`${b()} ${className || ''}`}
style={style}
{...rest}
catchMove
>
{renderToolbar()}
<div className={b('panel')} ref={pickerRef}>
{columnsList?.map((item, index) => {
......@@ -308,7 +314,7 @@ const InternalPicker: ForwardRefRenderFunction<unknown, Partial<PickerProps>> =
)
})}
</div>
</div>
</View>
</Popup>
)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册