@tuya-miniapp/smart-ui 2.0.2-beta-5 → 2.0.2-beta-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148,12 +148,16 @@ SmartComponent({
148
148
  return;
149
149
  }
150
150
  groupSetData(this, () => {
151
+ const task = [];
151
152
  children.forEach((item, index) => {
152
153
  const active = index === currentIndex;
153
154
  if (active !== item.data.active || !item.inited) {
154
- item.updateRender(active, this);
155
+ active
156
+ ? task.push(() => item.updateRender(active, this))
157
+ : task.unshift(() => item.updateRender(active, this));
155
158
  }
156
159
  });
160
+ task.forEach(fun => fun());
157
161
  });
158
162
  if (currentIndex === data.currentIndex) {
159
163
  if (!data.inited) {
package/lib/tabs/index.js CHANGED
@@ -167,12 +167,16 @@ var relation_1 = require("../common/relation");
167
167
  return;
168
168
  }
169
169
  (0, utils_1.groupSetData)(this, function () {
170
+ var task = [];
170
171
  children.forEach(function (item, index) {
171
172
  var active = index === currentIndex;
172
173
  if (active !== item.data.active || !item.inited) {
173
- item.updateRender(active, _this);
174
+ active
175
+ ? task.push(function () { return item.updateRender(active, _this); })
176
+ : task.unshift(function () { return item.updateRender(active, _this); });
174
177
  }
175
178
  });
179
+ task.forEach(function (fun) { return fun(); });
176
180
  });
177
181
  if (currentIndex === data.currentIndex) {
178
182
  if (!data.inited) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.0.2-beta-5",
3
+ "version": "2.0.2-beta-7",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",