2020-07-28 10:03:53 +08:00
|
|
|
---
|
|
|
|
title: TreeSelect 树形选择器
|
2020-12-02 15:08:47 +08:00
|
|
|
description:
|
2020-07-28 10:03:53 +08:00
|
|
|
type: 0
|
|
|
|
group: null
|
|
|
|
menuName: TreeSelect 树形选择器
|
2020-12-02 15:08:47 +08:00
|
|
|
icon:
|
2020-07-28 10:03:53 +08:00
|
|
|
order: 60
|
|
|
|
---
|
|
|
|
|
|
|
|
## 基本使用
|
|
|
|
|
2021-01-07 23:35:03 +08:00
|
|
|
```schema: scope="body"
|
2020-07-28 10:03:53 +08:00
|
|
|
{
|
|
|
|
"type": "form",
|
|
|
|
"api": "https://houtai.baidu.com/api/mock2/form/saveForm",
|
|
|
|
"controls": [
|
|
|
|
{
|
|
|
|
"type": "tree-select",
|
|
|
|
"name": "tree",
|
|
|
|
"label": "Tree",
|
|
|
|
"options": [
|
|
|
|
{
|
|
|
|
"label": "Folder A",
|
|
|
|
"value": 1,
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"label": "file A",
|
|
|
|
"value": 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": "file B",
|
|
|
|
"value": 3
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": "file C",
|
|
|
|
"value": 4
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": "file D",
|
|
|
|
"value": 5
|
2020-12-02 15:08:47 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": "Folder E",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"label": "Folder G",
|
|
|
|
"children": [
|
|
|
|
{
|
|
|
|
"label": "file H",
|
|
|
|
"value": 6
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": "file I",
|
|
|
|
"value": 7
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2020-07-28 10:03:53 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
更多用法,见 [Tree](./tree)
|