未验证 提交 9163a558 编写于 作者: liu_zheng_wu's avatar liu_zheng_wu 提交者: GitHub

fix: datepicker 选择日期时分秒时页面穿透滚动 (#860)

上级 3c390808
import React, { FunctionComponent, useState, useEffect, useRef } from 'react'
import Picker from '@/packages/picker/index.taro'
import { useConfig } from '@/packages/configprovider'
import { View } from '@tarojs/components'
export interface PickerOption {
text: string | number
......@@ -398,10 +399,11 @@ export const DatePicker: FunctionComponent<
}, [currentDate])
return (
<div
<View
className={`nut-datepicker ${className || ''}`}
style={style}
{...rest}
catchMove
>
{listData.length > 0 && (
<Picker
......@@ -422,7 +424,7 @@ export const DatePicker: FunctionComponent<
ref={pickerRef}
/>
)}
</div>
</View>
)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册