@aks-dev/easyui 1.2.12 → 1.2.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/package.json +1 -1
- package/dist/components/Modal/Modal.d.ts +0 -2
- package/dist/components/Modal/Modal.d.ts.map +0 -1
- package/dist/components/Modal/Modal.js +0 -8
- package/dist/jsbridge/UpgradeModule.d.ts +0 -26
- package/dist/jsbridge/UpgradeModule.d.ts.map +0 -1
- package/dist/jsbridge/UpgradeModule.js +0 -44
- package/dist/jsbridge/index.d.ts +0 -3
- package/dist/jsbridge/index.d.ts.map +0 -1
- package/dist/jsbridge/index.js +0 -9
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description: 获取App版本号
|
|
3
|
-
* @param {*}
|
|
4
|
-
* @return {*}
|
|
5
|
-
*/
|
|
6
|
-
export declare const getAppVersion: () => Promise<string>;
|
|
7
|
-
/**
|
|
8
|
-
* @description: 获取操作系统版本
|
|
9
|
-
*
|
|
10
|
-
react-native-device-info
|
|
11
|
-
* @return {*}
|
|
12
|
-
*/
|
|
13
|
-
export declare const getOSVersion: () => Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* @description: app升级
|
|
16
|
-
* @return {*}
|
|
17
|
-
*/
|
|
18
|
-
export type UpgradeOptions = {
|
|
19
|
-
title?: string;
|
|
20
|
-
version: string;
|
|
21
|
-
downloadUrl: string;
|
|
22
|
-
note: string;
|
|
23
|
-
force: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare const upgrade: (options: UpgradeOptions) => Promise<string>;
|
|
26
|
-
//# sourceMappingURL=UpgradeModule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UpgradeModule.d.ts","sourceRoot":"","sources":["../../src/jsbridge/UpgradeModule.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,CACjB,CAAC;AAChC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CACjB,CAAC;AAC/B;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,MAAM,CA4BhE,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: shiguo
|
|
3
|
-
* @Date: 2022-05-05 14:19:39
|
|
4
|
-
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2023-03-23 15:15:06
|
|
6
|
-
* @FilePath: /@aks-dev/easyui/jsbridge/UpgradeModule.ts
|
|
7
|
-
*/
|
|
8
|
-
import { NativeModules, PermissionsAndroid, Platform } from "react-native";
|
|
9
|
-
const { UpgradeModule } = NativeModules;
|
|
10
|
-
/**
|
|
11
|
-
* @description: 获取App版本号
|
|
12
|
-
* @param {*}
|
|
13
|
-
* @return {*}
|
|
14
|
-
*/
|
|
15
|
-
export const getAppVersion = () => UpgradeModule.getAppVersion();
|
|
16
|
-
/**
|
|
17
|
-
* @description: 获取操作系统版本
|
|
18
|
-
*
|
|
19
|
-
react-native-device-info
|
|
20
|
-
* @return {*}
|
|
21
|
-
*/
|
|
22
|
-
export const getOSVersion = () => UpgradeModule.getOSVersion();
|
|
23
|
-
export const upgrade = async (options) => {
|
|
24
|
-
const { title = "提示" } = options;
|
|
25
|
-
if (Platform.OS == "android") {
|
|
26
|
-
try {
|
|
27
|
-
const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE, {
|
|
28
|
-
title: "提示",
|
|
29
|
-
message: "应用升级需要获取APP的写入权限",
|
|
30
|
-
buttonNeutral: "稍后再询问",
|
|
31
|
-
buttonNegative: "取消",
|
|
32
|
-
buttonPositive: "确定",
|
|
33
|
-
});
|
|
34
|
-
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
|
|
35
|
-
return UpgradeModule.upgrade(options);
|
|
36
|
-
}
|
|
37
|
-
return Promise.reject("没有应用升级权限!");
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
return Promise.reject("请求权限异常!");
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return UpgradeModule.upgrade(options);
|
|
44
|
-
};
|
package/dist/jsbridge/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsbridge/index.ts"],"names":[],"mappings":"AAOA,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA"}
|
package/dist/jsbridge/index.js
DELETED