fineui是帆软报表和BI产品线所使用的前端框架。
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.

51 lines
836 B

7 years ago
# bi.switch_tree
7 years ago
### 可切换树
{% method %}
[source](https://jsfiddle.net/fineui/crd4z1nd/)
{% common %}
```javascript
var items = [{
id: -1,
pId: -2,
value: "根目录",
text: "根目录"
}, {
id: 1,
pId: -1,
value: "第一级目录1",
text: "第一级目录1"
}, {
id: 11,
pId: 1,
value: "第二级文件1",
text: "第二级文件1"
}];
var tree = BI.createWidget({
type: "bi.switch_tree",
items: items,
});
```
{% endmethod %}
## 参数设置
| 参数 | 说明 | 类型 | 默认值 |
| ----- | ------------- | ----- | ---- |
| items | 子项,pId代表父节点ID | array | [] |
## 方法
### 通用方法参见[Tree](#)方法
| 方法名 | 说明 | 用法 |
| ------------ | ----- | ------------ |
| switchSelect | 切换树结构 | switchSelect |