|
|
@ -14231,23 +14231,23 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var tree = BI.createWidget({ |
|
|
|
this.tree = BI.createWidget({ |
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
items: BI.deepClone(Demo.CONSTANTS.TREE), |
|
|
|
items: [], |
|
|
|
value: "第五级文件1" |
|
|
|
value: "第二级文件1" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.vtape", |
|
|
|
type: "bi.vtape", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: tree |
|
|
|
el: this.tree |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: "bi.button", |
|
|
|
type: "bi.button", |
|
|
|
height: 25, |
|
|
|
height: 25, |
|
|
|
text: "getValue", |
|
|
|
text: "getValue", |
|
|
|
handler: function () { |
|
|
|
handler: function () { |
|
|
|
BI.Msg.alert("", JSON.stringify(tree.getValue())); |
|
|
|
BI.Msg.alert("", JSON.stringify(self.tree.getValue())); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
height: 25 |
|
|
|
height: 25 |
|
|
@ -14257,7 +14257,7 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
height: 25, |
|
|
|
height: 25, |
|
|
|
text: "setValue (第二级文件1)", |
|
|
|
text: "setValue (第二级文件1)", |
|
|
|
handler: function () { |
|
|
|
handler: function () { |
|
|
|
tree.setValue(["第二级文件1"]); |
|
|
|
self.tree.setValue(["第二级文件1"]); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
height: 25 |
|
|
|
height: 25 |
|
|
@ -14265,6 +14265,10 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
width: 500, |
|
|
|
width: 500, |
|
|
|
hgap: 300 |
|
|
|
hgap: 300 |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted: function () { |
|
|
|
|
|
|
|
this.tree.populate(BI.deepClone(Demo.CONSTANTS.TREE)); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|