Tree: update doc and typing (#9225)

pull/9270/head
Decade 2018-01-14 20:37:48 +08:00 committed by 杨奕
parent e15272be56
commit a254106c5b
3 changed files with 6 additions and 3 deletions

View File

@ -938,7 +938,7 @@ Only one node among the same level can be expanded at one time.
| node-key | unique identity key name for nodes, its value should be unique across the whole tree | string | — | — |
| props | configuration options, see the following table | object | — | — |
| render-after-expand | whether to render child nodes only after a parent node is expanded for the first time | boolean | — | true |
| load | method for loading subtree data | function(node, resolve) | — | — |
| load | method for loading subtree data, lazy prop must be true | function(node, resolve) | — | — |
| render-content | render function for tree node | Function(h, { node, data, store } | — | — |
| highlight-current | whether current node is highlighted | boolean | — | false |
| default-expand-all | whether to expand all nodes by default | boolean | — | false |
@ -951,6 +951,7 @@ Only one node among the same level can be expanded at one time.
| filter-node-method | this function will be executed on each node when use filter method. if return `false`, tree node will be hidden. | Function(value, data, node) | — | — |
| accordion | whether only one node among the same level can be expanded at one time | boolean | — | false |
| indent | horizontal indentation of nodes in adjacent levels in pixels | number | — | 16 |
| lazy | lazy load leaf node used with load method | boolean | — | false |
### props
| Attribute | Description | Type | Accepted Values | Default |

View File

@ -937,7 +937,7 @@
| node-key | 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 | String | — | — |
| props | 配置选项,具体看下表 | object | — | — |
| render-after-expand | 是否在第一次展开某个树节点后才渲染其子节点 | boolean | — | true |
| load | 加载子树数据的方法 | function(node, resolve) | — | — |
| load | 加载子树数据的方法,lazy属性必须为true | function(node, resolve) | — | — |
| render-content | 树节点的内容区的渲染 Function | Function(h, { node, data, store } | — | — |
| highlight-current | 是否高亮当前选中节点,默认值是 false。 | boolean | — | false |
| default-expand-all | 是否默认展开所有节点 | boolean | — | false |
@ -950,6 +950,7 @@
| filter-node-method | 对树节点进行筛选时执行的方法,返回 true 表示这个节点可以显示,返回 false 则表示这个节点会被隐藏 | Function(value, data, node) | — | — |
| accordion | 是否每次只打开一个同级树节点展开 | boolean | — | false |
| indent | 相邻级节点间的水平缩进,单位为像素 | number | — | 16 |
| lazy | 懒加载子节点与load方法结合一起用 | boolean | — | false |
### props
| 参数 | 说明 | 类型 | 可选值 | 默认值 |

3
types/upload.d.ts vendored
View File

@ -15,7 +15,8 @@ export interface ElUploadInternalFileDetail {
size: number,
percentage: number,
uid: number,
raw: File
raw: File,
url?: string
}
export interface ElUploadProgressEvent extends ProgressEvent {