Browse Source

update demo

es6
zsmj 2 years ago
parent
commit
66544d73be
  1. 8
      demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js
  2. 8
      demo/js/widget/selecttree/demo.select_tree_combo.js
  3. 12
      demo/js/widget/singletree/demo.multilayer_single_tree_combo.js

8
demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js

@ -11,7 +11,8 @@ Demo.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
items: [
{
type: "bi.multilayer_select_tree_combo",
ref: function (_ref) {
self.tree = _ref;
@ -31,10 +32,11 @@ Demo.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
self.tree.setValue(["11"]);
},
width: 300
}],
}
],
vgap: 20
};
}

8
demo/js/widget/selecttree/demo.select_tree_combo.js

@ -11,7 +11,8 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
var items = BI.deepClone(Demo.CONSTANTS.LEVELTREE);
return {
type: "bi.horizontal_auto",
items: [{
items: [
{
type: "bi.select_tree_combo",
ref: function (_ref) {
self.tree = _ref;
@ -29,12 +30,13 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
width: 300
}, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
text: "setVlaue (11)",
handler: function () {
self.tree.setValue(["2"]);
},
width: 300
}],
}
],
vgap: 20
};
}

12
demo/js/widget/singletree/demo.multilayer_single_tree_combo.js

@ -11,7 +11,8 @@ Demo.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
var items = BI.deepClone(Demo.CONSTANTS.TREE);
return {
type: "bi.horizontal_auto",
items: [{
items: [
{
type: "bi.multilayer_single_tree_combo",
ref: function (_ref) {
self.tree = _ref;
@ -25,15 +26,16 @@ Demo.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
handler: function () {
BI.Msg.toast(self.tree.getValue()[0]);
},
width: 300
width: 300,
}, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
text: "setVlaue (11)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
self.tree.setValue(["11"]);
},
width: 300
}],
}
],
vgap: 20
};
}

Loading…
Cancel
Save