|
|
@ -11,33 +11,35 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, { |
|
|
|
var items = BI.deepClone(Demo.CONSTANTS.LEVELTREE); |
|
|
|
var items = BI.deepClone(Demo.CONSTANTS.LEVELTREE); |
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.horizontal_auto", |
|
|
|
type: "bi.horizontal_auto", |
|
|
|
items: [{ |
|
|
|
items: [ |
|
|
|
type: "bi.select_tree_combo", |
|
|
|
{ |
|
|
|
ref: function (_ref) { |
|
|
|
type: "bi.select_tree_combo", |
|
|
|
self.tree = _ref; |
|
|
|
ref: function (_ref) { |
|
|
|
}, |
|
|
|
self.tree = _ref; |
|
|
|
value: "11", |
|
|
|
}, |
|
|
|
text: "默认值", |
|
|
|
value: "11", |
|
|
|
items: items, |
|
|
|
text: "默认值", |
|
|
|
width: 300 |
|
|
|
items: items, |
|
|
|
}, { |
|
|
|
width: 300 |
|
|
|
type: "bi.button", |
|
|
|
}, { |
|
|
|
text: "getVlaue", |
|
|
|
type: "bi.button", |
|
|
|
handler: function () { |
|
|
|
text: "getVlaue", |
|
|
|
BI.Msg.toast(self.tree.getValue()[0]); |
|
|
|
handler: function () { |
|
|
|
}, |
|
|
|
BI.Msg.toast(self.tree.getValue()[0]); |
|
|
|
width: 300 |
|
|
|
}, |
|
|
|
}, { |
|
|
|
width: 300 |
|
|
|
type: "bi.button", |
|
|
|
}, { |
|
|
|
text: "setVlaue (第二级文件1)", |
|
|
|
type: "bi.button", |
|
|
|
handler: function () { |
|
|
|
text: "setVlaue (11)", |
|
|
|
self.tree.setValue(["2"]); |
|
|
|
handler: function () { |
|
|
|
}, |
|
|
|
self.tree.setValue(["2"]); |
|
|
|
width: 300 |
|
|
|
}, |
|
|
|
}], |
|
|
|
width: 300 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
vgap: 20 |
|
|
|
vgap: 20 |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("demo.select_tree_combo", Demo.SelectTreeCombo); |
|
|
|
BI.shortcut("demo.select_tree_combo", Demo.SelectTreeCombo); |
|
|
|