@extscreen/es-core 10000.0.15 → 10000.0.18
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.js +37 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1765,37 +1765,35 @@ class ESLaunchManager {
|
|
1765
1765
|
_ESRouterEnabled = true;
|
1766
1766
|
|
1767
1767
|
init(router) {
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
ESLog.
|
1772
|
-
'
|
1773
|
-
|
1774
|
-
|
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) {
|
1775
1783
|
}
|
1776
1784
|
return Promise.resolve();
|
1777
1785
|
}
|
1778
1786
|
|
1779
1787
|
setESRouterEnabled(enabled) {
|
1780
1788
|
this._ESRouterEnabled = enabled && this.isESRouterSupported();
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
'_ESRouterEnabled: ' + this._ESRouterEnabled
|
1785
|
-
);
|
1789
|
+
try {
|
1790
|
+
this._ESRouter.setEnabled(this._ESRouterEnabled);
|
1791
|
+
} catch (e) {
|
1786
1792
|
}
|
1787
1793
|
}
|
1788
1794
|
|
1789
1795
|
isESRouterEnabled() {
|
1790
|
-
|
1791
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
1792
|
-
ESLog.d('ESRouter', '#--------isESRouterEnabled------->>' + '\n' +
|
1793
|
-
'enabled: ' + enabled + '\n' +
|
1794
|
-
'_ESRouterEnabled: ' + this._ESRouterEnabled + '\n' +
|
1795
|
-
'isESRouterSupported: ' + this.isESRouterSupported()
|
1796
|
-
);
|
1797
|
-
}
|
1798
|
-
return enabled;
|
1796
|
+
return this._ESRouterEnabled && this.isESRouterSupported();
|
1799
1797
|
}
|
1800
1798
|
|
1801
1799
|
isESRouterSupported() {
|
@@ -2755,8 +2753,17 @@ const KEYCODE_SEARCH = 84;
|
|
2755
2753
|
var ESKeyEventMixin = {
|
2756
2754
|
mounted() {
|
2757
2755
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2756
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2757
|
+
ESLog.d('ESRouter', '----ESKeyEventMixin---监听Activity----->>>>');
|
2758
|
+
}
|
2758
2759
|
ESApp.$on('DispatchKeyEvent', this.onDispatchKeyEvent);
|
2759
2760
|
}
|
2761
|
+
//
|
2762
|
+
else {
|
2763
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2764
|
+
ESLog.d('ESRouter', '----ESKeyEventMixin---监听Fragment----->>>>');
|
2765
|
+
}
|
2766
|
+
}
|
2760
2767
|
},
|
2761
2768
|
beforeDestroy() {
|
2762
2769
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
@@ -2801,9 +2808,18 @@ var ESKeyEventMixin = {
|
|
2801
2808
|
var ESLifecycleMixin = {
|
2802
2809
|
mounted() {
|
2803
2810
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2811
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2812
|
+
ESLog.d('ESRouter', '----ESLifecycleMixin---监听Activity----->>>>');
|
2813
|
+
}
|
2804
2814
|
ESApp.$on('OnNewIntent', this.onESLifecycleNewIntent);
|
2805
2815
|
ESApp.$on('LifecycleChange', this.onESLifecycleChanged);
|
2806
2816
|
}
|
2817
|
+
//
|
2818
|
+
else {
|
2819
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2820
|
+
ESLog.d('ESRouter', '----ESLifecycleMixin---监听Fragment----->>>>');
|
2821
|
+
}
|
2822
|
+
}
|
2807
2823
|
},
|
2808
2824
|
beforeDestroy() {
|
2809
2825
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|