@aks-dev/easyui 1.0.154 → 1.0.157

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.
Binary file
Binary file
Binary file
Binary file
@@ -1,11 +1,11 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <shape xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:shape="rectangle">
4
- <!-- 填充的颜色 -->
5
- <!--<solid android:color="@android:color/transparent" />-->
6
- <!-- 设置按钮的四个角为弧形 -->
7
- <!-- android:radius 弧形的半径 -->
8
- <corners android:radius="4dp" />
9
- <!--边框的宽度及颜色-->
10
- <stroke android:width="2px" android:color="#CCCCCC" />
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <shape xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:shape="rectangle">
4
+ <!-- 填充的颜色 -->
5
+ <!--<solid android:color="@android:color/transparent" />-->
6
+ <!-- 设置按钮的四个角为弧形 -->
7
+ <!-- android:radius 弧形的半径 -->
8
+ <corners android:radius="4dp" />
9
+ <!--边框的宽度及颜色-->
10
+ <stroke android:width="2px" android:color="#CCCCCC" />
11
11
  </shape>
@@ -1,11 +1,11 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <shape xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:shape="rectangle">
4
- <!-- 填充的颜色 -->
5
- <solid android:color="#EA6561" />
6
- <!-- 设置按钮的四个角为弧形 -->
7
- <!-- android:radius 弧形的半径 -->
8
- <corners android:radius="4dp" />
9
- <!--边框的宽度及颜色-->
10
- <!--<stroke android:width="2px" android:color="#388e3c" />-->
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <shape xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:shape="rectangle">
4
+ <!-- 填充的颜色 -->
5
+ <solid android:color="#EA6561" />
6
+ <!-- 设置按钮的四个角为弧形 -->
7
+ <!-- android:radius 弧形的半径 -->
8
+ <corners android:radius="4dp" />
9
+ <!--边框的宽度及颜色-->
10
+ <!--<stroke android:width="2px" android:color="#388e3c" />-->
11
11
  </shape>
@@ -1,65 +1,65 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:id="@+id/update_root"
4
- android:layout_width="match_parent"
5
- android:layout_height="wrap_content"
6
- android:background="@drawable/upgrade_bg"
7
- android:orientation="vertical">
8
-
9
- <LinearLayout
10
- android:layout_width="match_parent"
11
- android:layout_height="wrap_content"
12
- android:layout_alignParentBottom="true"
13
- android:paddingLeft="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" />
27
-
28
- <TextView
29
- android:id="@+id/content"
30
- android:layout_width="wrap_content"
31
- android:layout_height="wrap_content"
32
- android:minHeight="190dp"
33
- android:singleLine="false"
34
- android:text="1.升级说明123123\\n2.升级说明22222" />
35
-
36
- </LinearLayout>
37
-
38
- <LinearLayout
39
- android:layout_width="match_parent"
40
- android:layout_height="120dp"
41
- android:layout_alignParentBottom="true"
42
- android:gravity="center"
43
- android:orientation="vertical">
44
-
45
- <Button
46
- android:id="@+id/btn_comfirm"
47
- style="?android:attr/borderlessButtonStyle"
48
- android:layout_width="200dp"
49
- android:layout_height="35dp"
50
- android:background="@drawable/update_confirm_btn"
51
- android:text="立即升级"
52
- android:textColor="#FFFFFF" />
53
-
54
- <Button
55
- android:id="@+id/btn_cancel"
56
- style="?android:attr/borderlessButtonStyle"
57
- android:layout_width="200dp"
58
- android:layout_height="35dp"
59
- android:layout_alignBottom="@id/btn_comfirm"
60
- android:layout_marginTop="10dp"
61
- android:background="@drawable/update_cancel_btn"
62
- android:text="残忍拒绝"
63
- android:textColor="#CCCCCC" />
64
- </LinearLayout>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:id="@+id/update_root"
4
+ android:layout_width="match_parent"
5
+ android:layout_height="wrap_content"
6
+ android:background="@drawable/upgrade_bg"
7
+ android:orientation="vertical">
8
+
9
+ <LinearLayout
10
+ android:layout_width="match_parent"
11
+ android:layout_height="wrap_content"
12
+ android:layout_alignParentBottom="true"
13
+ android:paddingLeft="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" />
27
+
28
+ <TextView
29
+ android:id="@+id/content"
30
+ android:layout_width="wrap_content"
31
+ android:layout_height="wrap_content"
32
+ android:minHeight="190dp"
33
+ android:singleLine="false"
34
+ android:text="1.升级说明123123\\n2.升级说明22222" />
35
+
36
+ </LinearLayout>
37
+
38
+ <LinearLayout
39
+ android:layout_width="match_parent"
40
+ android:layout_height="120dp"
41
+ android:layout_alignParentBottom="true"
42
+ android:gravity="center"
43
+ android:orientation="vertical">
44
+
45
+ <Button
46
+ android:id="@+id/btn_comfirm"
47
+ style="?android:attr/borderlessButtonStyle"
48
+ android:layout_width="200dp"
49
+ android:layout_height="35dp"
50
+ android:background="@drawable/update_confirm_btn"
51
+ android:text="立即升级"
52
+ android:textColor="#FFFFFF" />
53
+
54
+ <Button
55
+ android:id="@+id/btn_cancel"
56
+ style="?android:attr/borderlessButtonStyle"
57
+ android:layout_width="200dp"
58
+ android:layout_height="35dp"
59
+ android:layout_alignBottom="@id/btn_comfirm"
60
+ android:layout_marginTop="10dp"
61
+ android:background="@drawable/update_cancel_btn"
62
+ android:text="残忍拒绝"
63
+ android:textColor="#CCCCCC" />
64
+ </LinearLayout>
65
65
  </RelativeLayout>
package/ios/.DS_Store ADDED
Binary file
Binary file
Binary file
package/lib/.DS_Store ADDED
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.154",
3
+ "version": "1.0.157",
4
4
  "description": "工具箱",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",
package/screen/px2sp.ts CHANGED
@@ -1,80 +1,80 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2021-04-27 10:40:36
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-10-28 17:14:14
6
- * @FilePath: /@aks-dev/easyui/screen/px2sp.ts
7
- */
8
- import { Dimensions, PixelRatio } from 'react-native';
9
- const pixelRatio = PixelRatio.get();
10
- const width = Dimensions.get('window').width; //设备的宽度
11
- const height = Dimensions.get('window').height; //设备的高度
12
-
13
- export const px2sp = (size: number) => {
14
-
15
- // console.log({
16
- // pixelRatio,
17
- // width,
18
- // height
19
- // })
20
-
21
- if (pixelRatio === 2) {
22
- // iphone 5s and older Androids
23
- if (width < 360) {
24
- return size * 0.95;
25
- }
26
- // iphone 5
27
- if (height < 667) {
28
- return size;
29
- // iphone 6-6s
30
- } else if (height >= 667 && height <= 735) {
31
- return size * 1.15;
32
- }
33
- // older phablets
34
- return size * 1.25;
35
- }
36
- if (pixelRatio === 3) {
37
- // catch Android font scaling on small machines
38
- // where pixel ratio / font scale ratio => 3:3
39
- if (width <= 360) {
40
- return size;
41
- }
42
- // Catch other weird android width sizings
43
- if (height < 667) {
44
- return size * 1.15;
45
- // catch in-between size Androids and scale font up
46
- // a tad but not too much
47
- }
48
- if (height >= 667 && height <= 735) {
49
- return size * 1.2;
50
- }
51
- // catch larger devices
52
- // ie iphone 6s plus / 7 plus / mi note 等等
53
- return size * 1.27;
54
- }
55
- if (pixelRatio === 3.5) {
56
- // catch Android font scaling on small machines
57
- // where pixel ratio / font scale ratio => 3:3
58
- if (width <= 360) {
59
- return size;
60
- // Catch other smaller android height sizings
61
- }
62
- if (height < 667) {
63
- return size * 1.15;//older:1.20
64
- // catch in-between size Androids and scale font up
65
- // a tad but not too much
66
- }
67
- if (height >= 667 && height <= 735) {
68
- return size * 1.20;//older:1.25
69
- }
70
- // catch larger phablet devices
71
-
72
- return size * 1.25;//older:1.30
73
- }
74
- // if older device ie pixelRatio !== 2 || 3 || 3.5
75
- return size;
76
- };
77
-
78
-
79
-
80
-
1
+ /*
2
+ * @Author: shiguo
3
+ * @Date: 2021-04-27 10:40:36
4
+ * @LastEditors: shiguo
5
+ * @LastEditTime: 2022-10-28 17:14:14
6
+ * @FilePath: /@aks-dev/easyui/screen/px2sp.ts
7
+ */
8
+ import { Dimensions, PixelRatio } from 'react-native';
9
+ const pixelRatio = PixelRatio.get();
10
+ const width = Dimensions.get('window').width; //设备的宽度
11
+ const height = Dimensions.get('window').height; //设备的高度
12
+
13
+ export const px2sp = (size: number) => {
14
+
15
+ // console.log({
16
+ // pixelRatio,
17
+ // width,
18
+ // height
19
+ // })
20
+
21
+ if (pixelRatio === 2) {
22
+ // iphone 5s and older Androids
23
+ if (width < 360) {
24
+ return size * 0.95;
25
+ }
26
+ // iphone 5
27
+ if (height < 667) {
28
+ return size;
29
+ // iphone 6-6s
30
+ } else if (height >= 667 && height <= 735) {
31
+ return size * 1.15;
32
+ }
33
+ // older phablets
34
+ return size * 1.25;
35
+ }
36
+ if (pixelRatio === 3) {
37
+ // catch Android font scaling on small machines
38
+ // where pixel ratio / font scale ratio => 3:3
39
+ if (width <= 360) {
40
+ return size;
41
+ }
42
+ // Catch other weird android width sizings
43
+ if (height < 667) {
44
+ return size * 1.15;
45
+ // catch in-between size Androids and scale font up
46
+ // a tad but not too much
47
+ }
48
+ if (height >= 667 && height <= 735) {
49
+ return size * 1.2;
50
+ }
51
+ // catch larger devices
52
+ // ie iphone 6s plus / 7 plus / mi note 等等
53
+ return size * 1.27;
54
+ }
55
+ if (pixelRatio === 3.5) {
56
+ // catch Android font scaling on small machines
57
+ // where pixel ratio / font scale ratio => 3:3
58
+ if (width <= 360) {
59
+ return size;
60
+ // Catch other smaller android height sizings
61
+ }
62
+ if (height < 667) {
63
+ return size * 1.15;//older:1.20
64
+ // catch in-between size Androids and scale font up
65
+ // a tad but not too much
66
+ }
67
+ if (height >= 667 && height <= 735) {
68
+ return size * 1.20;//older:1.25
69
+ }
70
+ // catch larger phablet devices
71
+
72
+ return size * 1.25;//older:1.30
73
+ }
74
+ // if older device ie pixelRatio !== 2 || 3 || 3.5
75
+ return size;
76
+ };
77
+
78
+
79
+
80
+
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * @Author: shiguo
4
4
  * @Date: 2022-04-13 12:47:34
5
5
  * @LastEditors: shiguo
6
- * @LastEditTime: 2023-03-23 15:24:12
6
+ * @LastEditTime: 2023-03-23 15:26:14
7
7
  * @FilePath: /@aks-dev/easyui/src/index.ts
8
8
  */
9
9