guy 7 years ago
parent
commit
1dd69513eb
  1. 41
      demo/js/base/tree/demo.sync_tree.js
  2. 42
      dist/bundle.min.js
  3. 41
      dist/demo.js
  4. 12
      dist/fineui.min.js

41
demo/js/base/tree/demo.sync_tree.js

@ -3,7 +3,48 @@ Demo.Func = BI.inherit(BI.Widget, {
baseCls: "demo-func" baseCls: "demo-func"
}, },
mounted: function () {
this.syncTree.stroke();
},
render: function () { render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
type: "bi.label",
height: 50,
text: "可以异步获取数据的树"
}, {
type: "bi.async_tree",
ref: function (_ref) {
self.syncTree = _ref;
},
paras: {
selectedValues: {"_0": {}, "_5": {"_5_0": {}}}
},
itemsCreator: function (op, callback) {
callback({
items: [{
id: (op.id || "") + "1",
pId: op.id,
text: 1,
isParent: true
}, {
id: (op.id || "") + "2",
pId: op.id,
text: 2
}, {
id: (op.id || "") + "3",
pId: op.id,
text: 3
}],
hasNext: BI.isNull(op.id)
});
}
}]
};
} }
}); });
BI.shortcut("demo.sync_tree", Demo.Func); BI.shortcut("demo.sync_tree", Demo.Func);

42
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

41
dist/demo.js vendored

@ -1609,7 +1609,48 @@ BI.shortcut("demo.part_tree", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
baseCls: "demo-func" baseCls: "demo-func"
}, },
mounted: function () {
this.syncTree.stroke();
},
render: function () { render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
type: "bi.label",
height: 50,
text: "可以异步获取数据的树"
}, {
type: "bi.async_tree",
ref: function (_ref) {
self.syncTree = _ref;
},
paras: {
selectedValues: {"_0": {}, "_5": {"_5_0": {}}}
},
itemsCreator: function (op, callback) {
callback({
items: [{
id: (op.id || "") + "1",
pId: op.id,
text: 1,
isParent: true
}, {
id: (op.id || "") + "2",
pId: op.id,
text: 2
}, {
id: (op.id || "") + "3",
pId: op.id,
text: 3
}],
hasNext: BI.isNull(op.id)
});
}
}]
};
} }
}); });
BI.shortcut("demo.sync_tree", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { BI.shortcut("demo.sync_tree", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {

12
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save