For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/zh/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/zh/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/zh/components/tree-select.md.
v0.0.57
  • 简体中文
  • TreeSelect

    数据录入@rockshin/tao-ui

    从层级选项中选择值,支持搜索、多选与父子联动勾选。

    每个示例都可以独立复制运行。带设备预览的示例可通过工具栏切换桌面与手机宽度。

    尺寸支持 small、medium、large;兼容别名 middle 与 medium 使用相同尺寸。

    示例

    可搜索的单选

    使用 treeNodeFilterProp="title" 按节点标题搜索。

    TSX

    受控多选

    通过值数组控制多选,响应式标签折叠让输入区保持紧凑。

    TSX

    父子联动勾选

    全部可用后代被选中后,SHOW_PARENT 仅展示父节点标签。

    Product
    TSX

    保留选中标签

    labelInValue 返回包含 value 与展示标签的对象。

    Design

    Value: design

    TSX

    带父 ID 的扁平数据

    treeDataSimpleMode 将 id/pId 记录转换为层级结构。

    Choose a team
    TSX

    映射字段名称

    服务端字段名称不同时,映射 label、value 和 children。

    Choose a region
    TSX

    尺寸、外观与状态

    组件局部外观属性优先于 Provider 默认值。

    Design
    Review selection
    Team required
    Web
    TSX

    窄屏选择

    弹层保持在手机视口内;TreeSelect 在桌面与手机上都使用树形弹层。

    390 × 640
    TSX

    API

    TreeSelect

    属性说明类型默认值