|
|
|
@ -11,30 +11,32 @@ Demo.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
var items = BI.deepClone(Demo.CONSTANTS.TREE); |
|
|
|
|
return { |
|
|
|
|
type: "bi.horizontal_auto", |
|
|
|
|
items: [{ |
|
|
|
|
type: "bi.multilayer_select_tree_combo", |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.tree = _ref; |
|
|
|
|
}, |
|
|
|
|
defaultText: "请选择", |
|
|
|
|
items: items, |
|
|
|
|
width: 300, |
|
|
|
|
value: ["第五级文件1"] |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "getVlaue", |
|
|
|
|
handler: function () { |
|
|
|
|
BI.Msg.toast(self.tree.getValue()[0]); |
|
|
|
|
}, |
|
|
|
|
width: 300 |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "setVlaue (第二级文件1)", |
|
|
|
|
handler: function () { |
|
|
|
|
self.tree.setValue(["第二级文件1"]); |
|
|
|
|
}, |
|
|
|
|
width: 300 |
|
|
|
|
}], |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.multilayer_select_tree_combo", |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.tree = _ref; |
|
|
|
|
}, |
|
|
|
|
defaultText: "请选择", |
|
|
|
|
items: items, |
|
|
|
|
width: 300, |
|
|
|
|
value: ["第五级文件1"] |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "getVlaue", |
|
|
|
|
handler: function () { |
|
|
|
|
BI.Msg.toast(self.tree.getValue()[0]); |
|
|
|
|
}, |
|
|
|
|
width: 300 |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
text: "setVlaue (第二级文件1)", |
|
|
|
|
handler: function () { |
|
|
|
|
self.tree.setValue(["11"]); |
|
|
|
|
}, |
|
|
|
|
width: 300 |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
vgap: 20 |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|