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
1.3 KiB

7 years ago
/**
* Created by Dailer on 2017/7/26.
*/
Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
this.tree = BI.createWidget({
7 years ago
type: "bi.multilayer_single_level_tree",
items: [],
value: "第二级文件1"
7 years ago
});
return {
type: "bi.vtape",
items: [{
el: this.tree
7 years ago
}, {
el: {
type: "bi.button",
height: 25,
text: "getValue",
handler: function () {
BI.Msg.alert("", JSON.stringify(self.tree.getValue()));
7 years ago
}
},
height: 25
}, {
el: {
type: "bi.button",
height: 25,
text: "setValue (第二级文件1)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
7 years ago
}
},
height: 25
}],
width: 500,
hgap: 300
7 years ago
};
},
mounted: function () {
this.tree.populate(BI.deepClone(Demo.CONSTANTS.TREE));
7 years ago
}
});
BI.shortcut("demo.multilayer_single_level_tree", Demo.MultiLayerSingleLevelTree);