diff --git a/demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js b/demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js index 25ac4e518..e9ddefe5f 100644 --- a/demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js +++ b/demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js @@ -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 }; } diff --git a/demo/js/widget/selecttree/demo.select_tree_combo.js b/demo/js/widget/selecttree/demo.select_tree_combo.js index 1862340ab..e704e1f8a 100644 --- a/demo/js/widget/selecttree/demo.select_tree_combo.js +++ b/demo/js/widget/selecttree/demo.select_tree_combo.js @@ -11,33 +11,35 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, { var items = BI.deepClone(Demo.CONSTANTS.LEVELTREE); return { type: "bi.horizontal_auto", - items: [{ - type: "bi.select_tree_combo", - ref: function (_ref) { - self.tree = _ref; - }, - value: "11", - text: "默认值", - items: items, - width: 300 - }, { - 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(["2"]); - }, - width: 300 - }], + items: [ + { + type: "bi.select_tree_combo", + ref: function (_ref) { + self.tree = _ref; + }, + value: "11", + text: "默认值", + items: items, + width: 300 + }, { + type: "bi.button", + text: "getVlaue", + handler: function () { + BI.Msg.toast(self.tree.getValue()[0]); + }, + width: 300 + }, { + type: "bi.button", + text: "setVlaue (11)", + handler: function () { + self.tree.setValue(["2"]); + }, + width: 300 + } + ], vgap: 20 }; } }); -BI.shortcut("demo.select_tree_combo", Demo.SelectTreeCombo); \ No newline at end of file +BI.shortcut("demo.select_tree_combo", Demo.SelectTreeCombo); diff --git a/demo/js/widget/singletree/demo.multilayer_single_tree_combo.js b/demo/js/widget/singletree/demo.multilayer_single_tree_combo.js index 1a699c2ea..42d60420e 100644 --- a/demo/js/widget/singletree/demo.multilayer_single_tree_combo.js +++ b/demo/js/widget/singletree/demo.multilayer_single_tree_combo.js @@ -11,29 +11,31 @@ Demo.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { var items = BI.deepClone(Demo.CONSTANTS.TREE); return { type: "bi.horizontal_auto", - items: [{ - type: "bi.multilayer_single_tree_combo", - ref: function (_ref) { - self.tree = _ref; - }, - defaultText: "请选择", - items: items, - width: 300 - }, { - 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_single_tree_combo", + ref: function (_ref) { + self.tree = _ref; + }, + defaultText: "请选择", + items: items, + width: 300 + }, { + type: "bi.button", + text: "getVlaue", + handler: function () { + BI.Msg.toast(self.tree.getValue()[0]); + }, + width: 300, + }, { + type: "bi.button", + text: "setVlaue (11)", + handler: function () { + self.tree.setValue(["11"]); + }, + width: 300 + } + ], vgap: 20 }; }