@aks-dev/easyui 1.0.53 → 1.0.56
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 +5 -2
- package/jsbridge/RNEasyui.ts +5 -5
- package/package.json +1 -1
- package/screen/index.ts +2 -2
- package/screen/{px2dp.tsx → px2dp.ts} +4 -8
- /package/screen/{px2sp.tsx → px2sp.ts} +0 -0
- /package/screen/{init-fit.tsx → text-fit.tsx} +0 -0
- /package/utils/{lazy.tsx → lazy.ts} +0 -0
- /package/utils/{mode.tsx → mode.ts} +0 -0
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-
|
|
5
|
+
* @LastEditTime: 2022-06-01 10:11:48
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/README.md
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -15,6 +15,9 @@ or
|
|
|
15
15
|
`$ yarn add @aks-dev/easyui`
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
### App入口
|
|
19
|
+
+ <b>import '@aks-dev/easyui/screen/text-fit'</b>
|
|
20
|
+
|
|
18
21
|
### UI组件
|
|
19
22
|
|
|
20
23
|
+ Badge
|
|
@@ -33,7 +36,7 @@ or
|
|
|
33
36
|
### 工具包
|
|
34
37
|
|函数|作用|
|
|
35
38
|
|:----|:----|
|
|
36
|
-
|sleep
|
|
39
|
+
|sleep|睡眠|
|
|
37
40
|
|keyboardDismissHandlers|通过手势关闭键盘|
|
|
38
41
|
|panHandlersCallback|手势动作回调|
|
|
39
42
|
|callTelephone|拨打电话|
|
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-05-31
|
|
5
|
+
* @LastEditTime: 2022-05-31 18:42:45
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -19,12 +19,12 @@ export const getStatusBarHeight = () => {
|
|
|
19
19
|
const deviceHeight = Dimensions.get('window').height;
|
|
20
20
|
const isiPhoneX = Platform.OS == 'ios' && (deviceHeight > 736)
|
|
21
21
|
if (isiPhoneX) return Promise.resolve(44)
|
|
22
|
+
return Promise.resolve(20)
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export const getNavigationBarHeight = () => {
|
|
25
26
|
if (Platform.OS == 'android') return RNEasyui.getNavigationBarHeight();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return Promise.resolve(64)
|
|
27
|
+
|
|
28
|
+
return Promise.resolve(44)
|
|
29
|
+
|
|
30
30
|
}
|
package/package.json
CHANGED
package/screen/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-19 10:25:14
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-31
|
|
5
|
+
* @LastEditTime: 2022-05-31 18:34:57
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/screen/index.ts
|
|
7
7
|
*/
|
|
8
8
|
export declare const deviceWidth: number; //设备的宽度
|
|
@@ -19,7 +19,7 @@ export declare const isiPhoneX: boolean;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const statusBarHeight: number;
|
|
21
21
|
/**
|
|
22
|
-
* @description:
|
|
22
|
+
* @description: 顶部导航条的高度,高度不包含statusBarHeight
|
|
23
23
|
* @param {*}
|
|
24
24
|
* @return {*}
|
|
25
25
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-18 14:32:25
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-31 18:
|
|
6
|
-
* @FilePath: /@aks-dev/easyui/screen/px2dp.
|
|
5
|
+
* @LastEditTime: 2022-05-31 18:43:44
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/screen/px2dp.ts
|
|
7
7
|
*/
|
|
8
8
|
import { Dimensions, Platform, StatusBar } from 'react-native';
|
|
9
9
|
|
|
@@ -45,17 +45,13 @@ export const statusBarHeight = (() => {
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
export let navigationBarHeight =
|
|
49
|
-
if (isAndroid) return statusBarHeight + 44
|
|
50
|
-
if (isiPhoneX) return 88
|
|
51
|
-
return 64
|
|
52
|
-
})()
|
|
48
|
+
export let navigationBarHeight = 44
|
|
53
49
|
|
|
54
50
|
|
|
55
51
|
|
|
56
52
|
import * as RNEasyui from '../jsbridge/RNEasyui';
|
|
57
53
|
; (async () => {
|
|
58
|
-
navigationBarHeight = await RNEasyui.getNavigationBarHeight()
|
|
54
|
+
navigationBarHeight = await RNEasyui.getNavigationBarHeight();
|
|
59
55
|
})()
|
|
60
56
|
|
|
61
57
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|