@zhongguo168a/yxeditor-common 0.0.141 → 0.0.145

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.d.ts CHANGED
@@ -1352,7 +1352,7 @@ declare class ViewModel extends EventDispatcher {
1352
1352
  /**
1353
1353
  * 等待打开完成指令
1354
1354
  */
1355
- waitOpenComplete(...params: any): Promise<void>;
1355
+ waitOpenComplete(...params: any): Promise<any>;
1356
1356
  protected openComplete(): void;
1357
1357
  waitCloseComplete(): void;
1358
1358
  closeComplete(): void;
package/dist/index.esm.js CHANGED
@@ -4488,14 +4488,23 @@ class ViewModel extends EventDispatcher {
4488
4488
  waitOpenComplete(...params) {
4489
4489
  return __awaiter(this, void 0, void 0, function* () {
4490
4490
  this._waitOpenComplete = true;
4491
+ let err;
4491
4492
  for (const element of params) {
4492
- yield element();
4493
+ err = yield element();
4494
+ if (err) {
4495
+ break;
4496
+ }
4493
4497
  if (this.state == ViewState.Closed || this.state == ViewState.Closeing) {
4494
4498
  return;
4495
4499
  }
4496
4500
  }
4497
- if (params.length > 0) {
4498
- this.openComplete();
4501
+ if (err) {
4502
+ this.close();
4503
+ }
4504
+ else {
4505
+ if (params.length > 0) {
4506
+ this.openComplete();
4507
+ }
4499
4508
  }
4500
4509
  });
4501
4510
  }