@aks-dev/easyui 1.0.57 → 1.0.60

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-25 17:57:29
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-06-01 10:11:48
5
+ * @LastEditTime: 2022-06-01 14:55:18
6
6
  * @FilePath: /@aks-dev/easyui/README.md
7
7
  -->
8
8
 
@@ -14,11 +14,11 @@ or
14
14
 
15
15
  `$ yarn add @aks-dev/easyui`
16
16
 
17
-
18
- ### App入口
17
+ ### 禁止文本随系统缩放
19
18
  + <b>import '@aks-dev/easyui/screen/text-fit'</b>
20
19
 
21
20
  ### UI组件
21
+ ---
22
22
 
23
23
  + Badge
24
24
  + EasyHub
@@ -33,7 +33,8 @@ or
33
33
  + WithLoadingContainer
34
34
 
35
35
 
36
- ### 工具包
36
+ ### utils
37
+ ---
37
38
  |函数|作用|
38
39
  |:----|:----|
39
40
  |sleep|睡眠|
@@ -44,7 +45,7 @@ or
44
45
  |syncLoop|同步循环|
45
46
 
46
47
  ### jsbridge
47
-
48
+ ---
48
49
  |函数|作用|
49
50
  |:----|:----|
50
51
  |getAppVersion|获取App版本号|
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-25 17:57:29
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-31 18:19:20
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
 
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-05-31 18:19:53
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.57",
3
+ "version": "1.0.60",
4
4
  "description": "移动端开发工具包",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",
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-05-31 18:43:44
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 let navigationBarHeight = 44
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-05-31 18:22:50
6
- * @FilePath: /@aks-dev/easyui/screen/init-fit.tsx
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'