TreeSelect 树形选择器
用于多层级数据的逐级选择,交互和视觉参考示例 demo 进行了补全。
演示
9:41
代码示例
引入
推荐使用 easycom 模式,配置后无需手动 import 即可直接使用 <re-tree-select />。
API
TreeSelect Props
| 名称 | 类型 | 默认值 | 描述 | 必传 |
|---|---|---|---|---|
| value | TreeSelectValue | () : TreeSelectValue => as TreeSelectValue | 当前值 | N |
| options | Array<UTSJSONObject> | () : Array<UTSJSONObject> => as Array<UTSJSONObject> | - | N |
| multiple | boolean | false | - | N |
| keys | UTSJSONObject | () : UTSJSONObject => ({} as UTSJSONObject) | - | N |
| customStyle | string | '' | 自定义样式 | N |
| height | string | '640rpx' | - | N |
TreeSelect Events
| 名称 | 参数 | 描述 |
|---|---|---|
| change | value: TreeSelectValue | 值变化时触发 |
| click | item: UTSJSONObject | 点击时触发 |
TreeSelect Slots
| 名称 | 描述 |
|---|---|
| - | - |
