@extscreen/es-core 1.1.30 → 1.1.33

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.
Files changed (2) hide show
  1. package/dist/index.js +36 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1999,6 +1999,11 @@ class ESRouterLifecycleManager {
1999
1999
  return route.lifecycle.instance;
2000
2000
  }
2001
2001
 
2002
+ /**
2003
+ *
2004
+ * @param route
2005
+ * @param event
2006
+ */
2002
2007
  onESRouterLifecycleChanged(route, event) {
2003
2008
  let componentInstance = this.getComponentInstance(route);
2004
2009
  let lifecycleChanged = this.isFunction(componentInstance.onESLifecycleChanged);
@@ -2063,6 +2068,23 @@ class ESRouterLifecycleManager {
2063
2068
  }
2064
2069
  }
2065
2070
 
2071
+ /**
2072
+ *
2073
+ * @param route
2074
+ * @param params
2075
+ */
2076
+ onESRouterLifecycleNewIntent(route, params) {
2077
+ let componentInstance = this.getComponentInstance(route);
2078
+ let lifecycleChanged = this.isFunction(componentInstance.onESNewIntent);
2079
+ if (componentInstance && lifecycleChanged) {
2080
+ componentInstance.onESNewIntent(params);
2081
+ } else {
2082
+ if (ESLog.isLoggable(ESLog.DEBUG)) {
2083
+ ESLog.d(TAG$1, '#-------onESRouterLifecycleNewIntent-----实例对象为空------>>>>>');
2084
+ }
2085
+ }
2086
+ }
2087
+
2066
2088
  isFunction(func) {
2067
2089
  return Object.prototype.toString.call(func) === '[object Function]';
2068
2090
  }
@@ -2089,11 +2111,13 @@ var ESRouter = {
2089
2111
  ESApp.$on('hardwareBackPress', this.onESRouterBackPressed);
2090
2112
  ESApp.$on('DispatchKeyEvent', this.onESRouterDispatchKeyEvent);
2091
2113
  ESApp.$on('LifecycleChange', this.onESRouterLifecycleChanged);
2114
+ ESApp.$on('OnNewIntent', this.onESRouterLifecycleNewIntent);
2092
2115
  },
2093
2116
  beforeDestroy() {
2094
2117
  ESApp.$off('hardwareBackPress', this.onESRouterBackPressed);
2095
2118
  ESApp.$off('DispatchKeyEvent', this.onESRouterDispatchKeyEvent);
2096
2119
  ESApp.$off('LifecycleChange', this.onESRouterLifecycleChanged);
2120
+ ESApp.$off('OnNewIntent', this.onESRouterLifecycleNewIntent);
2097
2121
  },
2098
2122
 
2099
2123
  methods: {
@@ -2131,6 +2155,18 @@ var ESRouter = {
2131
2155
  ESRouterLifecycleManager$1.onESRouterLifecycleChanged(route, event);
2132
2156
  }
2133
2157
  },
2158
+
2159
+ //---------------------------onNewIntent--------------------------------
2160
+ onESRouterLifecycleNewIntent(intent) {
2161
+ if (ESLog.isLoggable(ESLog.DEBUG)) {
2162
+ ESLog.d(TAG, '#-------onESRouterLifecycleNewIntent----->>>>>' + intent);
2163
+ }
2164
+ let router = this.$router;
2165
+ if (router) {
2166
+ let route = router.currentRoute;
2167
+ ESRouterLifecycleManager$1.onESRouterLifecycleNewIntent(route, intent.params);
2168
+ }
2169
+ }
2134
2170
  },
2135
2171
  };
2136
2172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extscreen/es-core",
3
- "version": "1.1.30",
3
+ "version": "1.1.33",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {