You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
7 years ago
|
# bi.level_tree
|
||
|
|
||
|
### 二级树
|
||
|
|
||
|
{% method %}
|
||
|
[source](https://jsfiddle.net/fineui/nvvkwhfo/)
|
||
|
|
||
|
{% common %}
|
||
|
```javascript
|
||
|
var tree = BI.createWidget({
|
||
|
type: "bi.level_tree",
|
||
|
element: 'body',
|
||
|
items: [],
|
||
|
});
|
||
|
```
|
||
|
|
||
|
{% endmethod %}
|
||
|
|
||
|
|
||
|
|
||
|
### 参数设置
|
||
|
|
||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
| -------- | ----------------- | ------ | ---- |
|
||
|
| expander | branch_expander配置 | object | {} |
|
||
|
| items | 元素 | array | [] |
|
||
|
|
||
|
|
||
|
|
||
|
### 方法
|
||
|
|
||
7 years ago
|
| 方法名 | 说明 | 参数 |
|
||
7 years ago
|
| -------------- | -------- | ----------- |
|
||
|
| initTree | 构造树结构 | nodes |
|
||
|
| stroke | 生成树方法 | nodes |
|
||
7 years ago
|
| populate | 去掉所有内容 | items: 子项数组 |
|
||
7 years ago
|
| setValue | 设置值 | v |
|
||
|
| getValue | 获得值 | — |
|
||
|
| getAllLeaves | 获取所有叶节点 | — |
|
||
|
| getNodeById | 根据Id获取节点 | id |
|
||
|
| getNodeByValue | 根据值获取节点 | id |
|
||
7 years ago
|
|
||
7 years ago
|
------
|