diff --git a/demo/js/core/abstract/demo.virtual_group.js b/demo/js/core/abstract/demo.virtual_group.js index afda6ec1e3..0397e5cda0 100644 --- a/demo/js/core/abstract/demo.virtual_group.js +++ b/demo/js/core/abstract/demo.virtual_group.js @@ -89,6 +89,11 @@ Demo.Item = BI.inherit(BI.Widget, { } }, + shouldUpdate: function (nextProps) { + var o = this.options; + return o.type !== nextProps.type || o.key !== nextProps.key || o.value !== nextProps.value; + }, + update: function (item) { this.label.setText(item.value); console.log("更新了一项"); diff --git a/dist/demo.js b/dist/demo.js index 53aa18110a..23ac2d8f2c 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -7561,6 +7561,11 @@ Demo.Item = BI.inherit(BI.Widget, { } }, + shouldUpdate: function (nextProps) { + var o = this.options; + return o.type !== nextProps.type || o.key !== nextProps.key || o.value !== nextProps.value; + }, + update: function (item) { this.label.setText(item.value); console.log("更新了一项");