@aks-dev/easyui 1.0.56 → 1.0.59
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 +6 -5
- package/jsbridge/index.ts +2 -1
- package/package.json +4 -4
- package/screen/px2dp.ts +5 -11
- package/screen/text-fit.tsx +2 -4
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
|
|
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版本号|
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aks-dev/easyui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.59",
|
|
4
|
+
"description": "移动端开发工具包",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
12
12
|
"react-native",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"easyui",
|
|
14
|
+
"爱科森开发"
|
|
15
15
|
],
|
|
16
16
|
"files": [
|
|
17
17
|
"/android",
|
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
|
|
package/screen/text-fit.tsx
CHANGED
|
@@ -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'
|