@aks-dev/easyui 1.0.66 → 1.0.67
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.
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-25 17:57:29
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-07-07 09:19:52
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/RNEasyuiModule.java
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
package com.easyui;
|
|
10
10
|
|
|
11
|
+
import android.content.Intent;
|
|
12
|
+
|
|
13
|
+
import androidx.core.app.ActivityCompat;
|
|
14
|
+
|
|
11
15
|
import com.facebook.react.bridge.Promise;
|
|
12
16
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
13
17
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
@@ -63,4 +67,11 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
|
|
70
|
+
@ReactMethod
|
|
71
|
+
public void toDesktop() {
|
|
72
|
+
//启动一个意图,回到桌面
|
|
73
|
+
Intent desktop = new Intent(Intent.ACTION_MAIN);
|
|
74
|
+
desktop.addCategory(Intent.CATEGORY_HOME);
|
|
75
|
+
ActivityCompat.startActivity(getCurrentActivity(), desktop, null);
|
|
76
|
+
}
|
|
66
77
|
}
|
package/jsbridge/RNEasyui.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-19 10:23:01
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-07-07 09:20:05
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -27,4 +27,9 @@ export const getNavigationBarHeight = () => {
|
|
|
27
27
|
|
|
28
28
|
return Promise.resolve(44)
|
|
29
29
|
|
|
30
|
-
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export const toDesktop = () => {
|
|
34
|
+
if (Platform.OS == 'android') RNEasyui?.goHome();
|
|
35
|
+
}
|
package/jsbridge/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-19 10:23:01
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-07-07 09:21:12
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/jsbridge/index.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -43,4 +43,11 @@ export declare const getStatusBarHeight: () => Promise<number>;
|
|
|
43
43
|
* @description: 获取navigation_bar_height
|
|
44
44
|
* @return {*}
|
|
45
45
|
*/
|
|
46
|
-
export declare const getNavigationBarHeight: () => Promise<number>;
|
|
46
|
+
export declare const getNavigationBarHeight: () => Promise<number>;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* only android
|
|
51
|
+
* 返回桌面
|
|
52
|
+
*/
|
|
53
|
+
export declare const toDesktop : ()=>void;
|
package/package.json
CHANGED
package/utils/mode.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-18 18:40:07
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/easyui/utils/mode.
|
|
5
|
+
* @LastEditTime: 2022-07-07 09:18:06
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/utils/mode.ts
|
|
7
7
|
*/
|
|
8
8
|
import type { CallBack } from '.'
|
|
9
9
|
|
|
@@ -45,4 +45,5 @@ export const callTelephone = (phone: number | string) => {
|
|
|
45
45
|
console.warn('[sg:mode]', error.toString())
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
|
+
|