|
|
@ -6872,7 +6872,7 @@ BI.shortcut("demo.list_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_createItems: function () { |
|
|
|
_createItems: function () { |
|
|
|
var items = BI.makeArray(100, { |
|
|
|
var items = BI.makeArray(1000, { |
|
|
|
type: "demo.virtual_group_item" |
|
|
|
type: "demo.virtual_group_item" |
|
|
|
}); |
|
|
|
}); |
|
|
|
items[0].value = BI.UUID(); |
|
|
|
items[0].value = BI.UUID(); |
|
|
@ -6885,11 +6885,33 @@ BI.shortcut("demo.list_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { |
|
|
|
type: "bi.vertical", |
|
|
|
type: "bi.vertical", |
|
|
|
vgap: 20, |
|
|
|
vgap: 20, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
|
|
|
|
type: "bi.button_group", |
|
|
|
|
|
|
|
width: 500, |
|
|
|
|
|
|
|
height: 300, |
|
|
|
|
|
|
|
ref: function () { |
|
|
|
|
|
|
|
self.buttonGroup = this; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, |
|
|
|
|
|
|
|
layouts: [{ |
|
|
|
|
|
|
|
type: "bi.vertical" |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
items: this._createItems() |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.button", |
|
|
|
|
|
|
|
text: "演示button_group的刷新", |
|
|
|
|
|
|
|
handler: function () { |
|
|
|
|
|
|
|
var items = self._createItems(); |
|
|
|
|
|
|
|
items.pop(); |
|
|
|
|
|
|
|
self.buttonGroup.populate(items); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
type: "bi.virtual_group", |
|
|
|
type: "bi.virtual_group", |
|
|
|
width: 500, |
|
|
|
width: 500, |
|
|
|
height: 300, |
|
|
|
height: 300, |
|
|
|
ref: function () { |
|
|
|
ref: function () { |
|
|
|
self.buttonMap = this; |
|
|
|
self.virtualGroup = this; |
|
|
|
}, |
|
|
|
}, |
|
|
|
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, |
|
|
|
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI, |
|
|
|
layouts: [{ |
|
|
|
layouts: [{ |
|
|
@ -6900,11 +6922,11 @@ BI.shortcut("demo.list_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { |
|
|
|
items: this._createItems() |
|
|
|
items: this._createItems() |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
type: "bi.button", |
|
|
|
type: "bi.button", |
|
|
|
text: "点击刷新", |
|
|
|
text: "演示virtual_group的刷新", |
|
|
|
handler: function () { |
|
|
|
handler: function () { |
|
|
|
var items = self._createItems(); |
|
|
|
var items = self._createItems(); |
|
|
|
items.pop(); |
|
|
|
items.pop(); |
|
|
|
self.buttonMap.populate(items); |
|
|
|
self.virtualGroup.populate(items); |
|
|
|
} |
|
|
|
} |
|
|
|
}] |
|
|
|
}] |
|
|
|
|
|
|
|
|
|
|
@ -6934,7 +6956,7 @@ Demo.Item = BI.inherit(BI.Widget, { |
|
|
|
update: function (item) { |
|
|
|
update: function (item) { |
|
|
|
this.label.setText(item.value); |
|
|
|
this.label.setText(item.value); |
|
|
|
console.log("更新了一项"); |
|
|
|
console.log("更新了一项"); |
|
|
|
return true; |
|
|
|
return true;//返回是不是更新成功
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
created: function () { |
|
|
|
created: function () { |
|
|
|