@extscreen/es-core 2.3.11 → 2.3.13
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 +55 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1193,6 +1193,18 @@ class ESModule {
|
|
1193
1193
|
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
1194
1194
|
'finishAll');
|
1195
1195
|
}
|
1196
|
+
|
1197
|
+
//----------------------------组件和模块注册相关--------------------------------------------
|
1198
|
+
|
1199
|
+
isModuleRegistered(className) {
|
1200
|
+
return Vue.Native.callNativeWithPromise('ESModule',
|
1201
|
+
'isModuleRegistered', className);
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
isComponentRegistered(className) {
|
1205
|
+
return Vue.Native.callNativeWithPromise('ESModule',
|
1206
|
+
'isComponentRegistered', className);
|
1207
|
+
}
|
1196
1208
|
}
|
1197
1209
|
|
1198
1210
|
var ESModule$1 = new ESModule();
|
@@ -1208,6 +1220,12 @@ class ESFileModule {
|
|
1208
1220
|
);
|
1209
1221
|
}
|
1210
1222
|
|
1223
|
+
newESFile(pathname) {
|
1224
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
1225
|
+
'newESFile', {pathname: pathname}
|
1226
|
+
);
|
1227
|
+
}
|
1228
|
+
|
1211
1229
|
getName(fileId) {
|
1212
1230
|
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
1213
1231
|
'getName', {id: fileId}
|
@@ -1457,6 +1475,14 @@ class ESFile {
|
|
1457
1475
|
});
|
1458
1476
|
}
|
1459
1477
|
|
1478
|
+
newESFile(pathname) {
|
1479
|
+
return ESFileModule$1.newESFile(pathname)
|
1480
|
+
.then((fileId) => {
|
1481
|
+
this._fileId = fileId;
|
1482
|
+
return Promise.resolve(fileId);
|
1483
|
+
});
|
1484
|
+
}
|
1485
|
+
|
1460
1486
|
getFileId() {
|
1461
1487
|
return this._fileId;
|
1462
1488
|
}
|
@@ -1843,14 +1869,32 @@ class ESManager {
|
|
1843
1869
|
return this._esSdkVersionName;
|
1844
1870
|
}
|
1845
1871
|
|
1872
|
+
/**
|
1873
|
+
* 获取EsApp路径, 用于文件存储管理
|
1874
|
+
* @return
|
1875
|
+
* /data/data/APK包名/app_rpk/apps/小程序包名/files
|
1876
|
+
* 示例:/data/data/com.extscreen.runtime/app_rpk/apps/es.com.baduanjin.tv/files
|
1877
|
+
*/
|
1846
1878
|
getESMiniProgramPath() {
|
1847
1879
|
return this._esMiniProgramPath;
|
1848
1880
|
}
|
1849
1881
|
|
1882
|
+
/**
|
1883
|
+
* 获取EsApp路径, 用于文件存储管理
|
1884
|
+
* @return
|
1885
|
+
* /data/data/APK包名/app_rpk/apps/小程序包名/files
|
1886
|
+
* 示例:/data/data/com.extscreen.runtime/app_rpk/apps/es.com.baduanjin.tv/files
|
1887
|
+
*/
|
1850
1888
|
getESAppPath() {
|
1851
1889
|
return this._esMiniProgramPath;
|
1852
1890
|
}
|
1853
1891
|
|
1892
|
+
/**
|
1893
|
+
* 获取EsApp运行时路径, 通常用于获取代码包里的assets
|
1894
|
+
* @return
|
1895
|
+
* /data/data/APK包名/app_rpk/apps/小程序包名/版本号/android
|
1896
|
+
* 示例:/data/data/com.extscreen.runtime/app_rpk/apps/es.com.baduanjin.tv/2.2.2203/android
|
1897
|
+
*/
|
1854
1898
|
getESAppRuntimePath() {
|
1855
1899
|
return this._runtimePath;
|
1856
1900
|
}
|
@@ -1858,6 +1902,15 @@ class ESManager {
|
|
1858
1902
|
getESSDKSupportSchemes() {
|
1859
1903
|
return this._esSdkSchemes;
|
1860
1904
|
}
|
1905
|
+
|
1906
|
+
//----------------------------组件和模块注册相关--------------------------------------------
|
1907
|
+
isModuleRegistered(className) {
|
1908
|
+
return ESModule$1.isModuleRegistered(className);
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
isComponentRegistered(className) {
|
1912
|
+
return ESModule$1.isComponentRegistered(className);
|
1913
|
+
}
|
1861
1914
|
}
|
1862
1915
|
|
1863
1916
|
var ESManager$1 = new ESManager();
|
@@ -2677,7 +2730,7 @@ class ESLaunchManager {
|
|
2677
2730
|
if (this._routeListenerList && this._routeListenerList.length > 0) {
|
2678
2731
|
for (let i = 0; i < this._routeListenerList.length; i++) {
|
2679
2732
|
let listener = this._routeListenerList[i];
|
2680
|
-
if (listener) {
|
2733
|
+
if (listener && this.isFunction(listener)) {
|
2681
2734
|
try {
|
2682
2735
|
listener(url, params);
|
2683
2736
|
} catch (e) {
|
@@ -2695,7 +2748,7 @@ class ESLaunchManager {
|
|
2695
2748
|
}
|
2696
2749
|
|
2697
2750
|
_notifyListeners(url, params) {
|
2698
|
-
//1
|
2751
|
+
//1.
|
2699
2752
|
try {
|
2700
2753
|
if (this._routeListener && this.isFunction(this._routeListener)) {
|
2701
2754
|
this._routeListener(url, params);
|