@zhongguo168a/yxeditor-common 0.0.49 → 0.0.51

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
@@ -1040,6 +1040,7 @@ declare class RouteView extends EventDispatcher {
1040
1040
  open(): void;
1041
1041
  close(): void;
1042
1042
  refresh(): void;
1043
+ stop(): void;
1043
1044
  /**
1044
1045
  * 等待发送的结果
1045
1046
  * 如果返回 null,表示主动取消 [cancel]
@@ -1051,8 +1052,8 @@ declare class RouteView extends EventDispatcher {
1051
1052
  */
1052
1053
  waitOpenComplete(): void;
1053
1054
  openComplete(): void;
1054
- protected waitCloseComplete(view: RouteView): void;
1055
- closeComplete(this: RouteView): void;
1055
+ waitCloseComplete(): void;
1056
+ closeComplete(): void;
1056
1057
  protected _waitOpenComplete: boolean;
1057
1058
  protected _waitCloseComplete: boolean;
1058
1059
  get controller(): RouteController;
@@ -1062,6 +1063,7 @@ declare class RouteView extends EventDispatcher {
1062
1063
  onClose(value: (ctx: this) => void): this;
1063
1064
  onClosed(value: (ctx: this) => void): this;
1064
1065
  onRefresh(value: (ctx: this) => void): this;
1066
+ onStop(value: (ctx: this) => void): this;
1065
1067
  node: Node;
1066
1068
  datas: {};
1067
1069
  tags: {};
@@ -1075,6 +1077,7 @@ declare class RouteView extends EventDispatcher {
1075
1077
  private _onClose;
1076
1078
  private _onClosed;
1077
1079
  private _onRefresh;
1080
+ private _onStop;
1078
1081
  }
1079
1082
 
1080
1083
  declare class RouteController extends Controller {
@@ -1297,6 +1300,9 @@ declare class SampleCallbackList {
1297
1300
 
1298
1301
  declare class AssetURI {
1299
1302
  name: string;
1303
+ /**
1304
+ *
1305
+ */
1300
1306
  constructor(name: string);
1301
1307
  loadType: number;
1302
1308
  uuid: string;
package/dist/index.esm.js CHANGED
@@ -3931,6 +3931,18 @@ class RouteView extends EventDispatcher {
3931
3931
  console.error(e.stack);
3932
3932
  }
3933
3933
  }
3934
+ stop() {
3935
+ try {
3936
+ if (this._onStop) {
3937
+ this._onStop(this);
3938
+ ;
3939
+ }
3940
+ }
3941
+ catch (e) {
3942
+ console.error(`stop view ${this.route.key}`);
3943
+ console.error(e.stack);
3944
+ }
3945
+ }
3934
3946
  /**
3935
3947
  * 等待发送的结果
3936
3948
  * 如果返回 null,表示主动取消 [cancel]
@@ -3987,9 +3999,9 @@ class RouteView extends EventDispatcher {
3987
3999
  }
3988
4000
  this.dispatch(ViewEvent.Opened);
3989
4001
  }
3990
- waitCloseComplete(view) {
4002
+ waitCloseComplete() {
3991
4003
  // @ts-ignore
3992
- view._waitCloseComplete = true;
4004
+ this._waitCloseComplete = true;
3993
4005
  }
3994
4006
  closeComplete() {
3995
4007
  if (!this._waitCloseComplete) {
@@ -4029,6 +4041,10 @@ class RouteView extends EventDispatcher {
4029
4041
  this._onRefresh = value;
4030
4042
  return this;
4031
4043
  }
4044
+ onStop(value) {
4045
+ this._onStop = value;
4046
+ return this;
4047
+ }
4032
4048
  }
4033
4049
 
4034
4050
  class ViewHistory extends RouteList {
@@ -4417,6 +4433,9 @@ function parseAtlas(name, plist, texture) {
4417
4433
  }
4418
4434
 
4419
4435
  class AssetURI {
4436
+ /**
4437
+ *
4438
+ */
4420
4439
  constructor(name) {
4421
4440
  this.name = name;
4422
4441
  // 0-bundle+path 1-uuid 2-remote