@extscreen/es-core 1.1.1 → 1.1.4
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 +22 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2578,7 +2578,7 @@ function ESPageRootViewComponent() {
|
|
2578
2578
|
name: 'ESPageRootView',
|
2579
2579
|
processEventData(event, nativeEventName, nativeEventParams) {
|
2580
2580
|
switch (nativeEventName) {
|
2581
|
-
case '
|
2581
|
+
case 'onLifecycleChange':
|
2582
2582
|
event.lifecycle = nativeEventParams;
|
2583
2583
|
break;
|
2584
2584
|
case 'onDispatchKeyEvent':
|
@@ -2750,8 +2750,26 @@ const AUDIO_USAGE_ASSISTANT = 16;
|
|
2750
2750
|
*/
|
2751
2751
|
|
2752
2752
|
var ESBackPressMixin = {
|
2753
|
+
|
2753
2754
|
mounted() {
|
2754
|
-
|
2755
|
+
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2756
|
+
Vue.Native.callNative('DeviceEventModule', 'setListenBackPress', true);
|
2757
|
+
ESApp.$on('hardwareBackPress', this.onESBackPressed);
|
2758
|
+
}
|
2759
|
+
},
|
2760
|
+
beforeDestroy() {
|
2761
|
+
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2762
|
+
ESApp.$off('hardwareBackPress', this.onESBackPressed);
|
2763
|
+
}
|
2764
|
+
},
|
2765
|
+
|
2766
|
+
methods: {
|
2767
|
+
onESBackPressed() {
|
2768
|
+
this.onBackPressed();
|
2769
|
+
},
|
2770
|
+
onBackPressed() {
|
2771
|
+
|
2772
|
+
},
|
2755
2773
|
},
|
2756
2774
|
};
|
2757
2775
|
|
@@ -2777,17 +2795,8 @@ const KEYCODE_SEARCH = 84;
|
|
2777
2795
|
var ESKeyEventMixin = {
|
2778
2796
|
mounted() {
|
2779
2797
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2780
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2781
|
-
ESLog.d('ESRouter', '----ESKeyEventMixin---监听Activity----->>>>');
|
2782
|
-
}
|
2783
2798
|
ESApp.$on('DispatchKeyEvent', this.onDispatchKeyEvent);
|
2784
2799
|
}
|
2785
|
-
//
|
2786
|
-
else {
|
2787
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2788
|
-
ESLog.d('ESRouter', '----ESKeyEventMixin---监听Fragment----->>>>');
|
2789
|
-
}
|
2790
|
-
}
|
2791
2800
|
},
|
2792
2801
|
beforeDestroy() {
|
2793
2802
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
@@ -2801,9 +2810,7 @@ var ESKeyEventMixin = {
|
|
2801
2810
|
ESLog.d('ESRouter', '----ESKeyEventMixin---onDispatchKeyEvent----->>>>' + JSON.stringify(keyEvent));
|
2802
2811
|
}
|
2803
2812
|
if (keyEvent.action === KEY_ACTION_DOWN) {
|
2804
|
-
if (keyEvent.keyCode === KEYCODE_BACK || keyEvent.keyCode === KEYCODE_ESCAPE) {
|
2805
|
-
this.onBackPressed();
|
2806
|
-
} else {
|
2813
|
+
if (keyEvent.keyCode === KEYCODE_BACK || keyEvent.keyCode === KEYCODE_ESCAPE) ; else {
|
2807
2814
|
this.onKeyDown(keyEvent);
|
2808
2815
|
}
|
2809
2816
|
}
|
@@ -2819,9 +2826,6 @@ var ESKeyEventMixin = {
|
|
2819
2826
|
},
|
2820
2827
|
onKeyUp(keyEvent) {
|
2821
2828
|
|
2822
|
-
},
|
2823
|
-
onBackPressed() {
|
2824
|
-
|
2825
2829
|
},
|
2826
2830
|
},
|
2827
2831
|
};
|
@@ -2832,18 +2836,9 @@ var ESKeyEventMixin = {
|
|
2832
2836
|
var ESLifecycleMixin = {
|
2833
2837
|
mounted() {
|
2834
2838
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
2835
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2836
|
-
ESLog.d('ESRouter', '----ESLifecycleMixin---监听Activity----->>>>');
|
2837
|
-
}
|
2838
2839
|
ESApp.$on('OnNewIntent', this.onESLifecycleNewIntent);
|
2839
2840
|
ESApp.$on('LifecycleChange', this.onESLifecycleChanged);
|
2840
2841
|
}
|
2841
|
-
//
|
2842
|
-
else {
|
2843
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2844
|
-
ESLog.d('ESRouter', '----ESLifecycleMixin---监听Fragment----->>>>');
|
2845
|
-
}
|
2846
|
-
}
|
2847
2842
|
},
|
2848
2843
|
beforeDestroy() {
|
2849
2844
|
if (!ESLaunchManager$1.isESRouterEnabled()) {
|
@@ -2855,7 +2850,7 @@ var ESLifecycleMixin = {
|
|
2855
2850
|
methods: {
|
2856
2851
|
onESLifecycleChanged(event) {
|
2857
2852
|
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
2858
|
-
ESLog.d('ESRouter', '
|
2853
|
+
ESLog.d('ESRouter', '-------页面生命周期----->>>>' + this.$options.name + ":::::::" + event);
|
2859
2854
|
}
|
2860
2855
|
if (event === 'onCreate') {
|
2861
2856
|
this.onESCreate();
|
@@ -2869,14 +2864,6 @@ var ESLifecycleMixin = {
|
|
2869
2864
|
this.onESResume();
|
2870
2865
|
}
|
2871
2866
|
//
|
2872
|
-
else if (event === 'visibleToUser') {
|
2873
|
-
this.onESResume();
|
2874
|
-
}
|
2875
|
-
//
|
2876
|
-
else if (event === 'invisibleToUser') {
|
2877
|
-
this.onESPause();
|
2878
|
-
}
|
2879
|
-
//
|
2880
2867
|
else if (event === 'onPause') {
|
2881
2868
|
this.onESPause();
|
2882
2869
|
}
|
@@ -2902,12 +2889,6 @@ var ESLifecycleMixin = {
|
|
2902
2889
|
},
|
2903
2890
|
onESResume() {
|
2904
2891
|
|
2905
|
-
},
|
2906
|
-
onESInvisibleToUser() {
|
2907
|
-
|
2908
|
-
},
|
2909
|
-
onESVisibleToUser() {
|
2910
|
-
|
2911
2892
|
},
|
2912
2893
|
onESPause() {
|
2913
2894
|
|