-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: Picker和PickerView组件增加mouseWheel事件支持 #5052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
56b7b4e
eab247f
98ad1f8
f778596
4efebe3
a10fe19
9c0d71b
871a658
c130df9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ PickerView 是 [Picker](./picker/#picker) 的内容区域。 | |
| defaultValue | 默认选中项 | `PickerValue[]` | `[]` | | ||
| onChange | 选项改变时触发 | `(value: PickerValue[], extend: PickerValueExtend) => void` | - | | ||
| renderLabel | 自定义渲染每列展示的内容 | `(item: PickerColumnItem) => ReactNode` | `(item) => item.label` | | ||
| mouseWheel | 鼠标滚轮模式 | `boolean` | `false` | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 应该修正为 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一次滚动,直接滚动4条数据了 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
是的,目前依然有这个问题。不知道何时可以解决呢? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
我刚才提交了个pr,看会不会合并吧 #6853 |
||
|
||
关于 `PickerColumnItem` `PickerColumn` `PickerValue` `PickerValueExtend` 的类型定义,请参考 [Picker](./picker) 的文档。 | ||
|
||
|
@@ -70,6 +71,7 @@ DatePickerView 是 [DatePicker](./picker/#datepicker) 的内容区域。 | |
| precision | 精度 | `'year' \| 'month' \| 'day' \| 'hour' \| 'minute' \| 'second' \| 'week' \| 'week-day'` | `'day'` | | ||
| renderLabel | 自定义渲染每列展示的内容。其中 `type` 参数为 `precision` 中的任意值,`data` 参数为默认渲染的数字 | `(type: string, data: number) => ReactNode` | - | | ||
| filter | 过滤可供选择的时间 | `DatePickerFilter` | - | | ||
| mouseWheel | 鼠标滚轮模式 | `boolean` | `false` | | ||
|
||
关于 `DatePickerFilter` 的类型定义和使用,请参考 [DatePicker](./picker#datepicker) 的文档。 | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,4 +79,9 @@ export function useLockScroll( | |
} | ||
} | ||
}, [shouldLock]) | ||
|
||
return { | ||
lock, | ||
unlock, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该修正为
Enable mouse wheel mode