-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
组件使用代码
<a-tree-select
:replaceFields="{ title: 'name', key: 'id', value: 'id',children:'child' }"
style="width: 200px"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
placeholder="Please select"
@change="handleChange"
:tree-data="department"
>
接口数据是类似下面的格式:
[
{
"id": 396635329,
"ext": null,
"create_dept_group": 0,
"name": "外网网络安全小组",
"auto_add_user": 0,
"parent_id": 396562603,
"child": []
},
{
"id": 396562603,
"ext": null,
"create_dept_group": 0,
"name": "网络安全部",
"auto_add_user": 0,
"parent_id": 1,
"child": [
{
"id": 396635329,
"ext": null,
"create_dept_group": 0,
"name": "外网网络安全小组",
"auto_add_user": 0,
"parent_id": 396562603,
"child": []
},
{
"id": 396556903,
"ext": null,
"create_dept_group": 0,
"name": "内网网络安全小组",
"auto_add_user": 0,
"parent_id": 396562603,
"child": []
}
]
}
]
页面运行的时候,报错:
Warning: Conflict! value of node '68821074' (68821074) has already used by node '68821074'.
Warning: Conflict! value of node '311867066' (311867066) has already used by node '311867066'.