|
|
|
@ -4,7 +4,10 @@ Demo.Func = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
mounted: function () { |
|
|
|
|
this.syncTree.stroke({ |
|
|
|
|
this.syncTree1.stroke({ |
|
|
|
|
keyword: "1" |
|
|
|
|
}); |
|
|
|
|
this.syncTree2.stroke({ |
|
|
|
|
keyword: "1" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -13,38 +16,90 @@ Demo.Func = BI.inherit(BI.Widget, {
|
|
|
|
|
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: {"1": {}, "2": {"1": {}}} |
|
|
|
|
}, |
|
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
callback({ |
|
|
|
|
items: [{ |
|
|
|
|
id: (op.id || "") + "1", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: 1, |
|
|
|
|
isParent: true |
|
|
|
|
rowSize: [0.5, 0.5], |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.vtape", |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
height: 50, |
|
|
|
|
text: "可以异步获取数据的树" |
|
|
|
|
}, { |
|
|
|
|
id: (op.id || "") + "2", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: 2 |
|
|
|
|
type: "bi.async_tree", |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.syncTree1 = _ref; |
|
|
|
|
}, |
|
|
|
|
paras: { |
|
|
|
|
selectedValues: { "1": {}, "2": { "1": {} } } |
|
|
|
|
}, |
|
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
callback({ |
|
|
|
|
items: [{ |
|
|
|
|
id: (op.id || "") + "1", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: (op.id || "") + "1", |
|
|
|
|
isParent: true, |
|
|
|
|
iconCls: "close-h-font" |
|
|
|
|
}, { |
|
|
|
|
id: (op.id || "") + "2", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: (op.id || "") + "2", |
|
|
|
|
iconCls: "search-font" |
|
|
|
|
}, { |
|
|
|
|
id: (op.id || "") + "3", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: (op.id || "") + "3", |
|
|
|
|
iconCls: "date-font" |
|
|
|
|
}], |
|
|
|
|
hasNext: BI.isNull(op.id) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: "bi.vtape", |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
height: 50, |
|
|
|
|
text: "showIcon属性搭配节点iconCls,可以显示图标" |
|
|
|
|
}, { |
|
|
|
|
id: (op.id || "") + "3", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: 3 |
|
|
|
|
}], |
|
|
|
|
hasNext: BI.isNull(op.id) |
|
|
|
|
}); |
|
|
|
|
type: "bi.async_tree", |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.syncTree2 = _ref; |
|
|
|
|
}, |
|
|
|
|
paras: { |
|
|
|
|
selectedValues: { "1": {}, "2": { "1": {} } } |
|
|
|
|
}, |
|
|
|
|
showIcon: true, |
|
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
callback({ |
|
|
|
|
items: [{ |
|
|
|
|
id: (op.id || "") + "1", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: (op.id || "") + "1", |
|
|
|
|
isParent: true, |
|
|
|
|
iconCls: "close-h-font" |
|
|
|
|
}, { |
|
|
|
|
id: (op.id || "") + "2", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: (op.id || "") + "2", |
|
|
|
|
iconCls: "search-font" |
|
|
|
|
}, { |
|
|
|
|
id: (op.id || "") + "3", |
|
|
|
|
pId: op.id, |
|
|
|
|
text: (op.id || "") + "3", |
|
|
|
|
iconCls: "date-font" |
|
|
|
|
}], |
|
|
|
|
hasNext: BI.isNull(op.id) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
] |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|