@zhongguo168a/yxeditor-common 0.0.62 → 0.0.63

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
@@ -3920,7 +3920,6 @@ class RouteView extends EventDispatcher {
3920
3920
  if (this._onOpen) {
3921
3921
  this._onOpen(this);
3922
3922
  }
3923
- // @ts-ignore
3924
3923
  if (!this._waitOpenComplete) {
3925
3924
  // 没有被打断,打开完成
3926
3925
  this.openComplete();
@@ -3946,7 +3945,6 @@ class RouteView extends EventDispatcher {
3946
3945
  if (this._onClose) {
3947
3946
  this._onClose(this);
3948
3947
  }
3949
- // @ts-ignore
3950
3948
  if (!this._waitCloseComplete) {
3951
3949
  // 没有被打断,关闭完成
3952
3950
  this.closeComplete();
@@ -4030,8 +4028,8 @@ class RouteView extends EventDispatcher {
4030
4028
  this._waitOpenComplete = true;
4031
4029
  }
4032
4030
  openComplete() {
4033
- if (!this._waitOpenComplete) {
4034
- throw "未执行 waitCloseComplete";
4031
+ if (this.state == ViewState.Opened) {
4032
+ return;
4035
4033
  }
4036
4034
  this.state = ViewState.Opened;
4037
4035
  // @ts-ignore
@@ -4046,8 +4044,8 @@ class RouteView extends EventDispatcher {
4046
4044
  this._waitCloseComplete = true;
4047
4045
  }
4048
4046
  closeComplete() {
4049
- if (!this._waitCloseComplete) {
4050
- throw "未执行 waitCloseComplete";
4047
+ if (this.state == ViewState.Closed) {
4048
+ return;
4051
4049
  }
4052
4050
  viewrepo.delete(this.route.key);
4053
4051
  this._waitCloseComplete = false;