update tree docs for children & isLeaf (#9739)

pull/9751/head
FuryBean 2018-02-09 10:29:32 +08:00 committed by 杨奕
parent 6bef614c01
commit 607aef0ac7
3 changed files with 7 additions and 7 deletions

View File

@ -1023,9 +1023,9 @@ Only one node among the same level can be expanded at one time.
| Attribute | Description | Type | Accepted Values | Default |
| --------- | ---------------------------------------- | ------ | --------------- | ------- |
| label | specify which key of node object is used as the node's label | string, function(data, node) | — | — |
| children | specify which node object is used as the node's subtree | string, function(data, node) | — | — |
| children | specify which node object is used as the node's subtree | string | — | — |
| disabled | specify which key of node object represents if node's checkbox is disabled | boolean, function(data, node) | — | — |
| isLeaf | specify whether the node is a leaf node | boolean, function(data, node) | — | — |
| isLeaf | specify whether the node is a leaf node, only works when lazy load is enabled | boolean, function(data, node) | — | — |
### Method
`Tree` has the following method, which returns the currently selected array of nodes.

View File

@ -1022,8 +1022,8 @@ Solo puede ser expandido un nodo del mismo nivel a la vez.
| Atributo | Descripción | Tipo | Valores aceptados | Por defecto |
| -------- | ---------------------------------------- | ----------------------------- | ----------------- | ----------- |
| label | Especifica que clave del objecto nodo se utilizará como label | string, function(data, node) | — | — |
| children | Especifica que objeto del nodo se utiliza como subárbol | string, function(data, node) | — | — |
| isLeaf | Especifica si el nodo es una hoja | boolean, function(data, node) | — | — |
| children | Especifica que objeto del nodo se utiliza como subárbol | string | — | — |
| isLeaf | Especifica si el nodo es una hoja, only works when lazy load is enabled | boolean, function(data, node) | — | — |
### Métodos
`Tree` tiene los siguientes métodos, que devuelven el array de nodos seleccionados.

View File

@ -1022,9 +1022,9 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| -------- | ----------------- | ------ | ---- | ---- |
| label | 指定节点标签为节点对象的某个属性值 | string, function(data, node) | — | — |
| children | 指定子树为节点对象的某个属性值 | string, function(data, node) | — | — |
| children | 指定子树为节点对象的某个属性值 | string | — | — |
| disabled | 指定节点选择框是否禁用为节点对象的某个属性值 | boolean, function(data, node) | — | — |
| isLeaf | 指定节点是否为叶子节点 | boolean, function(data, node) | — | — |
| isLeaf | 指定节点是否为叶子节点,仅在指定了 lazy 属性的情况下生效 | boolean, function(data, node) | — | — |
### 方法
`Tree` 内部使用了 Node 类型的对象来包装用户传入的数据,用来保存目前节点的状态。