Browse Source

finish case/tree

master
iapyang 7 years ago
parent
commit
ee81b49e59
  1. 40
      uidoc/case/tree/branch_relation.md
  2. 2
      uidoc/case/tree/handstand_branch_tree.md
  3. 42
      uidoc/case/tree/level_tree.md
  4. 39
      uidoc/case/tree/simple_tree.md

40
uidoc/case/tree/branch_relation.md

@ -1,2 +1,40 @@
# branch_relation
# bi.branch_relation
### 表关联树
{% method %}
[source](https://jsfiddle.net/fineui/z5hLcruk/)
{% common %}
```javascript
var tree = BI.createWidget({
type: "bi.simple_tree",
element: 'body',
items: [],
direction: BI.Direction.Right,
align: BI.HorizontalAlign.Right,
centerOffset: -50
});
```
{% endmethod %}
### 参数设置
| 参数 | 说明 | 类型 | 默认值 |
| ------------ | ------- | ------ | -------------------- |
| centerOffset | 重心偏移量 | number | 0 |
| direction | 根节点所在方向 | string | BI.Direction.Bottom |
| align | 对齐方向 | string | BI.VerticalAlign.Top |
| items | 元素 | array | null |
### 方法
| 方法名 | 说明 | 回调参数 |
| -------- | ---- | ----------- |
| populate | 刷新内容 | items: 子项数组 |

2
uidoc/case/tree/handstand_branch_tree.md

@ -1,5 +1,3 @@
# handstand_branch_tree
# bi.branch_tree
### 纵向分支的树

42
uidoc/case/tree/level_tree.md

@ -1,2 +1,42 @@
# level_tree
# 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 | [] |
### 方法
| 方法名 | 说明 | 回调参数 |
| -------------- | -------- | ----------- |
| initTree | 构造树结构 | nodes |
| stroke | 生成树方法 | nodes |
| populate | 刷新内容 | items: 子项数组 |
| setValue | 设置值 | v |
| getValue | 获得值 | — |
| getAllLeaves | 获取所有叶节点 | — |
| getNodeById | 根据Id获取节点 | id |
| getNodeByValue | 根据值获取节点 | id |

39
uidoc/case/tree/simple_tree.md

@ -1,2 +1,39 @@
# simple_tree
# bi.simple_tree
### 简单的多选树
{% method %}
[source](https://jsfiddle.net/fineui/5qtobqxb/)
{% common %}
```javascript
var tree = BI.createWidget({
type: "bi.simple_tree",
element: 'body',
});
tree.populate(items);
```
{% endmethod %}
### 参数设置
| 参数 | 说明 | 类型 | 默认值 |
| ------------ | -------- | -------- | ---------- |
| itemsCreator | items构造器 | function | BI.emptyFn |
| items | 元素 | array | null |
### 方法
| 方法名 | 说明 | 回调参数 |
| -------- | ---- | ------------------------------ |
| populate | 刷新内容 | items: 子项数组 keywords: 关键字标红字符串 |
| setValue | 设置值 | v |
| getValue | 获得值 | — |
| empty | 清空树 | — |

Loading…
Cancel
Save