@extscreen/es-core 10000.0.16 → 10000.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +39 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1763,41 +1763,37 @@ class ESLaunchManager {
|
|
1763
1763
|
|
1764
1764
|
_ESRouter = null;
|
1765
1765
|
_ESRouterEnabled = true;
|
1766
|
-
_initTime = 0;
|
1767
1766
|
|
1768
1767
|
init(router) {
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
ESLog.
|
1773
|
-
'
|
1774
|
-
|
1775
|
-
|
1768
|
+
try {
|
1769
|
+
this._ESRouter = router;
|
1770
|
+
this._ESRouterEnabled = this.isESRouterSupported();
|
1771
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
1772
|
+
ESLog.d('ESRouter', '#------init--------->>' + '\n' +
|
1773
|
+
'_ESRouterEnabled: ' + this._ESRouterEnabled + '\n' +
|
1774
|
+
'_ESRouter: ' + this._ESRouter
|
1775
|
+
);
|
1776
|
+
}
|
1777
|
+
} catch (e) {
|
1778
|
+
}
|
1779
|
+
//
|
1780
|
+
try {
|
1781
|
+
this._ESRouter.setEnabled(this._ESRouterEnabled);
|
1782
|
+
} catch (e) {
|
1776
1783
|
}
|
1777
|
-
this._initTime = new Date().getTime();
|
1778
1784
|
return Promise.resolve();
|
1779
1785
|
}
|
1780
1786
|
|
1781
1787
|
setESRouterEnabled(enabled) {
|
1782
1788
|
this._ESRouterEnabled = enabled && this.isESRouterSupported();
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
'_ESRouterEnabled: ' + this._ESRouterEnabled
|
1787
|
-
);
|
1789
|
+
try {
|
1790
|
+
this._ESRouter.setEnabled(this._ESRouterEnabled);
|
1791
|
+
} catch (e) {
|
1788
1792
|
}
|
1789
1793
|
}
|
1790
1794
|
|
1791
1795
|
isESRouterEnabled() {
|
1792
|
-
|
1793
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
1794
|
-
ESLog.d('ESRouter', '#--------isESRouterEnabled------->>' + '\n' +
|
1795
|
-
'enabled: ' + enabled + '\n' +
|
1796
|
-
'_ESRouterEnabled: ' + this._ESRouterEnabled + '\n' +
|
1797
|
-
'isESRouterSupported: ' + this.isESRouterSupported()
|
1798
|
-
);
|
1799
|
-
}
|
1800
|
-
return enabled;
|
1796
|
+
return this._ESRouterEnabled && this.isESRouterSupported();
|
1801
1797
|
}
|
1802
1798
|
|
1803
1799
|
isESRouterSupported() {
|
@@ -2757,8 +2753,17 @@ const KEYCODE_SEARCH = 84;
|
|
2757
2753
|
var ESKeyEventMixin = {
|
2758
2754
|
mounted() {
|
2759
2755
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2756
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2757
|
+
ESLog.d('ESRouter', '----ESKeyEventMixin---监听Activity----->>>>');
|
2758
|
+
}
|
2760
2759
|
ESApp.$on('DispatchKeyEvent', this.onDispatchKeyEvent);
|
2761
2760
|
}
|
2761
|
+
//
|
2762
|
+
else {
|
2763
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2764
|
+
ESLog.d('ESRouter', '----ESKeyEventMixin---监听Fragment----->>>>');
|
2765
|
+
}
|
2766
|
+
}
|
2762
2767
|
},
|
2763
2768
|
beforeDestroy() {
|
2764
2769
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
@@ -2803,9 +2808,18 @@ var ESKeyEventMixin = {
|
|
2803
2808
|
var ESLifecycleMixin = {
|
2804
2809
|
mounted() {
|
2805
2810
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2811
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2812
|
+
ESLog.d('ESRouter', '----ESLifecycleMixin---监听Activity----->>>>');
|
2813
|
+
}
|
2806
2814
|
ESApp.$on('OnNewIntent', this.onESLifecycleNewIntent);
|
2807
2815
|
ESApp.$on('LifecycleChange', this.onESLifecycleChanged);
|
2808
2816
|
}
|
2817
|
+
//
|
2818
|
+
else {
|
2819
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2820
|
+
ESLog.d('ESRouter', '----ESLifecycleMixin---监听Fragment----->>>>');
|
2821
|
+
}
|
2822
|
+
}
|
2809
2823
|
},
|
2810
2824
|
beforeDestroy() {
|
2811
2825
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
@@ -2832,11 +2846,11 @@ var ESLifecycleMixin = {
|
|
2832
2846
|
}
|
2833
2847
|
//
|
2834
2848
|
else if (event === 'visibleToUser') {
|
2835
|
-
this.
|
2849
|
+
this.onESResume();
|
2836
2850
|
}
|
2837
2851
|
//
|
2838
2852
|
else if (event === 'invisibleToUser') {
|
2839
|
-
this.
|
2853
|
+
this.onESPause();
|
2840
2854
|
}
|
2841
2855
|
//
|
2842
2856
|
else if (event === 'onPause') {
|