forked from fanruan/fineui
5 changed files with 102 additions and 5 deletions
@ -1,2 +1,42 @@ |
|||||||
# display_tree |
# bi.display_tree |
||||||
|
|
||||||
|
### 异步树控件 |
||||||
|
|
||||||
|
{% method %} |
||||||
|
[source](https://jsfiddle.net/fineui/cfL6fpa1/) |
||||||
|
|
||||||
|
{% common %} |
||||||
|
```javascript |
||||||
|
var tree = BI.createWidget({ |
||||||
|
type: "bi.display_tree", |
||||||
|
element: 'body', |
||||||
|
}); |
||||||
|
|
||||||
|
tree.initTree({ |
||||||
|
id: 1, |
||||||
|
text: '', |
||||||
|
open: true, |
||||||
|
}); |
||||||
|
``` |
||||||
|
|
||||||
|
{% endmethod %} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 参数设置 |
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | |
||||||
|
| -------- | -------------------- | ------ | ---- | |
||||||
|
| — | — | — | — | |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 方法 |
||||||
|
|
||||||
|
| 方法名 | 说明 | 回调参数 | |
||||||
|
| -------- | ------ | ---- | |
||||||
|
| initTree | 加载tree结构 | node: 节点数组 settings: 配置项 | |
||||||
|
| destroy | 摧毁元素 | — | |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@ |
|||||||
# handstand_branch_editor |
|
||||||
|
|
@ -0,0 +1,48 @@ |
|||||||
|
# handstand_branch_tree |
||||||
|
|
||||||
|
# bi.branch_tree |
||||||
|
### 纵向分支的树 |
||||||
|
|
||||||
|
{% method %} |
||||||
|
[source](https://jsfiddle.net/fineui/c2kaoc7x/) |
||||||
|
|
||||||
|
{% common %} |
||||||
|
```javascript |
||||||
|
BI.createWidget({ |
||||||
|
type: "bi.handstand_branch_tree", |
||||||
|
element: 'body', |
||||||
|
el: {}, |
||||||
|
items: [{ |
||||||
|
el: {}, |
||||||
|
children: [{ |
||||||
|
el: {}, |
||||||
|
children: {}, |
||||||
|
// ... |
||||||
|
}] |
||||||
|
}] |
||||||
|
}); |
||||||
|
``` |
||||||
|
|
||||||
|
{% endmethod %} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 参数设置 |
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | |
||||||
|
| -------- | -------------------- | ------ | ---- | |
||||||
|
| expander | branch_expander组件配置项 | object | {} | |
||||||
|
| el | | object | {} | |
||||||
|
| items | 子项 | array | [] | |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 方法 |
||||||
|
|
||||||
|
| 方法名 | 说明 | 回调参数 | |
||||||
|
| -------- | ------ | ---- | |
||||||
|
| populate | 去掉所有内容 | — | |
||||||
|
| getValue | 获取所选项值 | — | |
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue