@zhongguo168a/yxeditor-common 0.0.45 → 0.0.47
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 +10 -5
- package/dist/index.esm.js +31 -18
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1057,11 +1057,11 @@ declare class RouteView extends EventDispatcher {
|
|
|
1057
1057
|
protected _waitCloseComplete: boolean;
|
|
1058
1058
|
get controller(): RouteController;
|
|
1059
1059
|
get route(): Route;
|
|
1060
|
-
onOpen: () => void;
|
|
1061
|
-
onOpened: () => void;
|
|
1062
|
-
onClose: () => void;
|
|
1063
|
-
onClosed: () => void;
|
|
1064
|
-
onRefresh: () => void;
|
|
1060
|
+
onOpen(value: () => void): this;
|
|
1061
|
+
onOpened(value: () => void): this;
|
|
1062
|
+
onClose(value: () => void): this;
|
|
1063
|
+
onClosed(value: () => void): this;
|
|
1064
|
+
onRefresh(value: () => void): this;
|
|
1065
1065
|
node: Node;
|
|
1066
1066
|
datas: {};
|
|
1067
1067
|
tags: {};
|
|
@@ -1070,6 +1070,11 @@ declare class RouteView extends EventDispatcher {
|
|
|
1070
1070
|
state: ViewState;
|
|
1071
1071
|
protected _controller: RouteController;
|
|
1072
1072
|
protected _route: Route;
|
|
1073
|
+
private _onOpen;
|
|
1074
|
+
private _onOpened;
|
|
1075
|
+
private _onClose;
|
|
1076
|
+
private _onClosed;
|
|
1077
|
+
private _onRefresh;
|
|
1073
1078
|
}
|
|
1074
1079
|
|
|
1075
1080
|
declare class RouteController extends Controller {
|
package/dist/index.esm.js
CHANGED
|
@@ -3871,8 +3871,8 @@ class RouteView extends EventDispatcher {
|
|
|
3871
3871
|
//
|
|
3872
3872
|
try {
|
|
3873
3873
|
//
|
|
3874
|
-
if (this.
|
|
3875
|
-
this.
|
|
3874
|
+
if (this._onOpen) {
|
|
3875
|
+
this._onOpen(this);
|
|
3876
3876
|
}
|
|
3877
3877
|
// @ts-ignore
|
|
3878
3878
|
if (!this._waitOpenComplete) {
|
|
@@ -3897,8 +3897,8 @@ class RouteView extends EventDispatcher {
|
|
|
3897
3897
|
this.state = ViewState.Closeing;
|
|
3898
3898
|
this.dispatch(ViewEvent.Closeing);
|
|
3899
3899
|
try {
|
|
3900
|
-
if (this.
|
|
3901
|
-
this.
|
|
3900
|
+
if (this._onClose) {
|
|
3901
|
+
this._onClose(this);
|
|
3902
3902
|
}
|
|
3903
3903
|
// @ts-ignore
|
|
3904
3904
|
if (!this._waitCloseComplete) {
|
|
@@ -3916,16 +3916,9 @@ class RouteView extends EventDispatcher {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
refresh() {
|
|
3918
3918
|
try {
|
|
3919
|
-
if (this.
|
|
3920
|
-
this.
|
|
3921
|
-
|
|
3922
|
-
// @ts-ignore
|
|
3923
|
-
if (!this._waitCloseComplete) {
|
|
3924
|
-
// 没有被打断,关闭完成
|
|
3925
|
-
this.closeComplete();
|
|
3926
|
-
}
|
|
3927
|
-
else {
|
|
3928
|
-
// 被打断了,等待完成1
|
|
3919
|
+
if (this._onRefresh) {
|
|
3920
|
+
this._onRefresh(this);
|
|
3921
|
+
;
|
|
3929
3922
|
}
|
|
3930
3923
|
}
|
|
3931
3924
|
catch (e) {
|
|
@@ -3981,8 +3974,8 @@ class RouteView extends EventDispatcher {
|
|
|
3981
3974
|
this.state = ViewState.Opened;
|
|
3982
3975
|
// @ts-ignore
|
|
3983
3976
|
this._waitOpenComplete = false;
|
|
3984
|
-
if (this.
|
|
3985
|
-
this.
|
|
3977
|
+
if (this._onOpened) {
|
|
3978
|
+
this._onOpened(this);
|
|
3986
3979
|
}
|
|
3987
3980
|
this.dispatch(ViewEvent.Opened);
|
|
3988
3981
|
}
|
|
@@ -3995,8 +3988,8 @@ class RouteView extends EventDispatcher {
|
|
|
3995
3988
|
this._waitCloseComplete = false;
|
|
3996
3989
|
this.state = ViewState.Closed;
|
|
3997
3990
|
this.dispatch(ViewEvent.Closed);
|
|
3998
|
-
if (this.
|
|
3999
|
-
this.
|
|
3991
|
+
if (this._onClosed) {
|
|
3992
|
+
this._onClosed(this);
|
|
4000
3993
|
}
|
|
4001
3994
|
}
|
|
4002
3995
|
get controller() {
|
|
@@ -4005,6 +3998,26 @@ class RouteView extends EventDispatcher {
|
|
|
4005
3998
|
get route() {
|
|
4006
3999
|
return this._route;
|
|
4007
4000
|
}
|
|
4001
|
+
onOpen(value) {
|
|
4002
|
+
this._onOpen = value;
|
|
4003
|
+
return this;
|
|
4004
|
+
}
|
|
4005
|
+
onOpened(value) {
|
|
4006
|
+
this._onOpened = value;
|
|
4007
|
+
return this;
|
|
4008
|
+
}
|
|
4009
|
+
onClose(value) {
|
|
4010
|
+
this._onClose = value;
|
|
4011
|
+
return this;
|
|
4012
|
+
}
|
|
4013
|
+
onClosed(value) {
|
|
4014
|
+
this._onClosed = value;
|
|
4015
|
+
return this;
|
|
4016
|
+
}
|
|
4017
|
+
onRefresh(value) {
|
|
4018
|
+
this._onRefresh = value;
|
|
4019
|
+
return this;
|
|
4020
|
+
}
|
|
4008
4021
|
}
|
|
4009
4022
|
|
|
4010
4023
|
class ViewHistory extends RouteList {
|