@aks-dev/easyui 1.0.58 → 1.0.61
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/android/src/main/java/com/easyui/RNEasyuiModule.java +5 -1
- package/android/src/main/java/com/easyui/UpgradeModule.java +5 -1
- package/android/src/main/res/layout/update_dialog.xml +24 -10
- package/jsbridge/index.ts +2 -1
- package/lib/TableCell/TableCell.tsx +0 -1
- package/package.json +1 -1
- package/screen/px2dp.ts +5 -11
- package/screen/{text-fit.tsx → text-fit.ts} +2 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-25 17:57:29
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-06-02 13:16:45
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/RNEasyuiModule.java
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -27,6 +27,8 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
|
|
|
27
27
|
return "RNEasyui";
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
@Deprecated
|
|
30
32
|
@ReactMethod
|
|
31
33
|
public void getStatusBarHeight(final Promise promise) {
|
|
32
34
|
|
|
@@ -41,6 +43,8 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
|
|
|
41
43
|
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
|
|
47
|
+
@Deprecated
|
|
44
48
|
@ReactMethod
|
|
45
49
|
public void getNavigationBarHeight(final Promise promise) {
|
|
46
50
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-05-05 13:57:25
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-06-08 10:55:21
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/UpgradeModule.java
|
|
7
7
|
*/
|
|
8
8
|
package com.easyui;
|
|
@@ -45,6 +45,7 @@ import com.facebook.react.bridge.ReactMethod;
|
|
|
45
45
|
import com.facebook.react.bridge.ReadableMap;
|
|
46
46
|
|
|
47
47
|
import org.jetbrains.annotations.NotNull;
|
|
48
|
+
import org.w3c.dom.Text;
|
|
48
49
|
|
|
49
50
|
import java.io.File;
|
|
50
51
|
import java.io.FileOutputStream;
|
|
@@ -104,6 +105,7 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
104
105
|
public void upgrade(final ReadableMap info, final Promise promise) {
|
|
105
106
|
HashMap hashMap = info.toHashMap();
|
|
106
107
|
String version = (String) hashMap.get("version");
|
|
108
|
+
String title = (String) hashMap.get("title");
|
|
107
109
|
String downloadUrl = (String) hashMap.get("downloadUrl");
|
|
108
110
|
String note = (String) hashMap.get("note");
|
|
109
111
|
Boolean force = (Boolean) hashMap.get("force");
|
|
@@ -150,8 +152,10 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
|
|
|
150
152
|
TextView contentView = view.findViewById(R.id.content);
|
|
151
153
|
Button confirmBtn = view.findViewById(R.id.btn_comfirm);
|
|
152
154
|
Button cancelBtn = view.findViewById(R.id.btn_cancel);
|
|
155
|
+
TextView titleView = view.findViewById(R.id.txt_title);
|
|
153
156
|
|
|
154
157
|
contentView.setText(note);
|
|
158
|
+
titleView.setText(title);
|
|
155
159
|
confirmBtn.setOnClickListener(new View.OnClickListener() {
|
|
156
160
|
@Override
|
|
157
161
|
public void onClick(View v) {
|
|
@@ -1,23 +1,37 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
3
|
android:id="@+id/update_root"
|
|
4
|
-
android:
|
|
4
|
+
android:layout_width="match_parent"
|
|
5
5
|
android:layout_height="wrap_content"
|
|
6
|
-
android:background="@drawable/upgrade_bg"
|
|
6
|
+
android:background="@drawable/upgrade_bg"
|
|
7
|
+
android:orientation="vertical">
|
|
7
8
|
|
|
8
9
|
<LinearLayout
|
|
9
10
|
android:layout_width="match_parent"
|
|
10
|
-
android:layout_height="
|
|
11
|
+
android:layout_height="wrap_content"
|
|
11
12
|
android:layout_alignParentBottom="true"
|
|
12
13
|
android:paddingLeft="15dp"
|
|
13
|
-
android:paddingRight="15dp"
|
|
14
|
+
android:paddingRight="15dp"
|
|
15
|
+
android:orientation="vertical"
|
|
16
|
+
>
|
|
17
|
+
|
|
18
|
+
<TextView
|
|
19
|
+
android:id="@+id/txt_title"
|
|
20
|
+
android:layout_width="match_parent"
|
|
21
|
+
android:layout_height="wrap_content"
|
|
22
|
+
android:gravity="center"
|
|
23
|
+
android:text="标题"
|
|
24
|
+
android:textColor="#333333"
|
|
25
|
+
android:textSize="16sp"
|
|
26
|
+
android:textStyle="bold" />
|
|
14
27
|
|
|
15
28
|
<TextView
|
|
16
29
|
android:id="@+id/content"
|
|
17
30
|
android:layout_width="wrap_content"
|
|
18
31
|
android:layout_height="wrap_content"
|
|
32
|
+
android:minHeight="190dp"
|
|
19
33
|
android:singleLine="false"
|
|
20
|
-
android:text="1.升级说明123123\\n2.升级说明22222"/>
|
|
34
|
+
android:text="1.升级说明123123\\n2.升级说明22222" />
|
|
21
35
|
|
|
22
36
|
</LinearLayout>
|
|
23
37
|
|
|
@@ -30,22 +44,22 @@
|
|
|
30
44
|
|
|
31
45
|
<Button
|
|
32
46
|
android:id="@+id/btn_comfirm"
|
|
47
|
+
style="?android:attr/borderlessButtonStyle"
|
|
33
48
|
android:layout_width="200dp"
|
|
34
49
|
android:layout_height="35dp"
|
|
35
|
-
android:textColor="#FFFFFF"
|
|
36
50
|
android:background="@drawable/update_confirm_btn"
|
|
37
51
|
android:text="立即升级"
|
|
38
|
-
|
|
52
|
+
android:textColor="#FFFFFF" />
|
|
39
53
|
|
|
40
54
|
<Button
|
|
41
55
|
android:id="@+id/btn_cancel"
|
|
56
|
+
style="?android:attr/borderlessButtonStyle"
|
|
42
57
|
android:layout_width="200dp"
|
|
43
58
|
android:layout_height="35dp"
|
|
44
59
|
android:layout_alignBottom="@id/btn_comfirm"
|
|
45
|
-
android:background="@drawable/update_cancel_btn"
|
|
46
60
|
android:layout_marginTop="10dp"
|
|
47
|
-
android:
|
|
61
|
+
android:background="@drawable/update_cancel_btn"
|
|
48
62
|
android:text="残忍拒绝"
|
|
49
|
-
|
|
63
|
+
android:textColor="#CCCCCC" />
|
|
50
64
|
</LinearLayout>
|
|
51
65
|
</RelativeLayout>
|
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-06-02 11:03:49
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/jsbridge/index.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -39,6 +39,7 @@ export declare const upgrade: (options: UpgradeOptions) => Promise<string>;
|
|
|
39
39
|
export declare const getStatusBarHeight: () => Promise<number>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
+
* @deprecated 测量不准确,已放弃
|
|
42
43
|
* @description: 获取navigation_bar_height
|
|
43
44
|
* @return {*}
|
|
44
45
|
*/
|
package/package.json
CHANGED
package/screen/px2dp.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-18 14:32:25
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-06-02 11:04:21
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/screen/px2dp.ts
|
|
7
7
|
*/
|
|
8
8
|
import { Dimensions, Platform, StatusBar } from 'react-native';
|
|
@@ -36,22 +36,16 @@ export const px2dp = (uiElePx: number) => {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
export const statusBarHeight = (() => {
|
|
39
|
-
if (isAndroid)
|
|
40
|
-
if ((StatusBar.currentHeight || 0) > 20) return 40
|
|
41
|
-
}
|
|
39
|
+
if (isAndroid) return StatusBar.currentHeight || 24
|
|
42
40
|
if (isiPhoneX) return 44
|
|
43
41
|
return 20
|
|
44
42
|
})()
|
|
45
43
|
|
|
46
44
|
|
|
47
45
|
|
|
48
|
-
export
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
import * as RNEasyui from '../jsbridge/RNEasyui';
|
|
53
|
-
; (async () => {
|
|
54
|
-
navigationBarHeight = await RNEasyui.getNavigationBarHeight();
|
|
46
|
+
export const navigationBarHeight = (() => {
|
|
47
|
+
if (isAndroid) return 56
|
|
48
|
+
return 44
|
|
55
49
|
})()
|
|
56
50
|
|
|
57
51
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-15 14:15:07
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks-dev/easyui/screen/
|
|
5
|
+
* @LastEditTime: 2022-06-02 11:03:59
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/screen/text-fit.tsx
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* 全局配置Text
|
|
@@ -58,5 +58,3 @@ Text.defaultProps.allowFontScaling = false
|
|
|
58
58
|
TextInput.defaultProps.allowFontScaling = false
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
import './px2dp'
|