data |
Array |
[] |
```javascript
[{
"id": "1266212814637371392",
"type": "0",
"label": "圆圈科技",
"parentId": "0",
"hasChild": true,
"children": [...],
"disabled": false // 节点是否禁用
}]
```
</td>
</tr>
<tr>
<td>multiple</td>
<td>Boolean</td>
<td>false</td>
<td>是否是多选</td>
</tr>
<tr>
<td>model-mode</td>
<td>String</td>
<td>'node'</td>
<td>
:multiple="false" 可选:'node' / 'leaf' / 'route' / 'all' / 'tree'<br />
:multiple="true" 可选: 'node' / 'leaf' / 'all' / 'tree' / 'gather'
</td>
</tr>
<tr>
<td>model-type</td>
<td>String</td>
<td>'node'</td>
<td>'node' / 'id'</td>
</tr>
<tr>
<td>v-model</td>
<td>Array</td>
<td>[]</td>
<td>
[叶节点2.1, 父节点1, ...]
[叶节点1.1, 叶节点2.1, 叶节点2.2, ...]
[父节点1, 父节点1.1, 叶节点1.1.1(被选中)]
[父节点1, 父节点1.1, 父节点1.1.1(被选中), 叶节点1.1.1.1, 叶节点1.1.1.2]
[{
"id": "1266212814637371392",
"type": "0",
"label": "圆圈科技",
"parentId": "0",
"hasChild": true,
"children": [...],
"disabled": false
}]
[父节点1, 父节点1.1, 叶节点1.1.1(被选中), 叶节点1.1.3(被选中)]
</td>
</tr>
<tr>
<td>readonly</td>
<td>Boolean</td>
<td>false</td>
<td>只读</td>
</tr>
<tr>
<td>show-filter</td>
<td>Boolean</td>
<td>false</td>
<td>是否显示搜索过滤框</td>
</tr>
<tr>
<td>accordion</td>
<td>Boolean</td>
<td>false</td>
<td>是否每次只打开一个同级树节点展开</td>
</tr>
<tr>
<td>expand-level</td>
<td>number</td>
<td>0</td>
<td>默认展开层级</td>
</tr>
<tr>
<td>expand-all</td>
<td>Boolean</td>
<td>false</td>
<td>是否展开全部</td>
</tr>
<tr>
<td>filter-placeholder</td>
<td>String</td>
<td>'请输入关键字过滤'</td>
<td>过滤框placeholder</td>
</tr>
<tr>
<td>empty-text</td>
<td>String</td>
<td>'暂无数据'</td>
<td>没有数据的提示语</td>
</tr>
<tr>
<td>expand-keys</td>
<td>array</td>
<td>[]</td>
<td>展开节点</td>
</tr>
<tr>
<td>select-key</td>
<td>String</td>
<td>''</td>
<td>单选节点</td>
</tr>
<tr>
<td>check-keys</td>
<td>array</td>
<td>[]</td>
<td>选中节点</td>
</tr>
<tr>
<td>async</td>
<td>Boolean</td>
<td>false</td>
<td>是否启用异步加载</td>
</tr>
<tr>
<td>loader</td>
<td>Promise</td>
<td></td>
<td>异步加载方法</td>
</tr>
<tr>
<td>on-change</td>
<td>(selectNode:当前节点, changeData:值, checkedNodes:已选节点)=>{}</td>
<td></td>
<td>变化事件</td>
</tr>
<tr>
<td>node-click</td>
<td>(selectNode:当前节点)=>{}</td>
<td></td>
<td>节点点击事件</td>
</tr>
|