@ibiz-template/runtime 0.7.41-alpha.147 → 0.7.41-alpha.148

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.
package/dist/index.esm.js CHANGED
@@ -31122,6 +31122,7 @@ var MDControlController = class extends ControlController {
31122
31122
  async afterLoad(args, items) {
31123
31123
  this.handleRefreshMode(args);
31124
31124
  this.calcSelectDataBySelectKey();
31125
+ this.calcToolberButtonState();
31125
31126
  return items;
31126
31127
  }
31127
31128
  /**
@@ -31286,7 +31287,6 @@ var MDControlController = class extends ControlController {
31286
31287
  });
31287
31288
  }
31288
31289
  setSelection(selection, isEmit = true) {
31289
- var _a3, _b2;
31290
31290
  const { selectedData } = this.state;
31291
31291
  if (!isElementSame(selectedData, selection)) {
31292
31292
  this.state.selectedData = selection;
@@ -31296,16 +31296,24 @@ var MDControlController = class extends ControlController {
31296
31296
  });
31297
31297
  }
31298
31298
  }
31299
- const data = selection == null ? void 0 : selection[0];
31299
+ this.calcToolberButtonState();
31300
+ }
31301
+ /**
31302
+ * @description 计算工具栏按钮状态
31303
+ * @memberof MDControlController
31304
+ */
31305
+ calcToolberButtonState() {
31306
+ var _a3, _b2;
31307
+ const data = this.state.selectedData[0];
31300
31308
  (_a3 = this.batchToolbarController) == null ? void 0 : _a3.calcButtonState(
31301
31309
  data,
31302
31310
  this.model.appDataEntityId,
31303
- { view: this.view, ctrl: this, data: selection }
31311
+ { view: this.view, ctrl: this, data: this.state.selectedData }
31304
31312
  );
31305
31313
  (_b2 = this.quickToolbarController) == null ? void 0 : _b2.calcButtonState(
31306
31314
  data,
31307
31315
  this.model.appDataEntityId,
31308
- { view: this.view, ctrl: this, data: selection }
31316
+ { view: this.view, ctrl: this, data: this.state.selectedData }
31309
31317
  );
31310
31318
  }
31311
31319
  /**