For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/components/form/picker-view.md.

picker-view

滚轮选择器容器,支持多列组合选择。

扫码预览

扫码预览 picker-view

Props

属性名类型默认值必填说明
childrenReactNode-否子元素,通常是 PickerColumn
classNamestring-否组件类名
itemHeightnumber-否单个选项高度,单位 px。PickerView 会用它同步 indicator 高度和滚动居中计算。
onChange(values: (string | number)[], options: PickerColumnOption[]) => void-否选项变化时触发
styleCSSProperties-否组件样式
themeTheme-否组件主题。未传时跟随豆包当前主题;传入后固定使用指定主题。

Ref 方法

方法名类型说明
getOptions() => PickerColumnOption[]按列顺序获取各列当前选中项的完整选项数据。
getValues() => (string | number)[]按列顺序获取各列当前选中项的值。
setValues(values: (string | number)[]) => void按列顺序把各列滚动到指定值对应的选项。