@aks-dev/easyui 1.0.85 → 1.0.88
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/lib/MenuView/MenuView.tsx +4 -4
- package/package.json +1 -1
- package/readme.md +19 -2
- package/screen/px2sp.ts +9 -1
- package/utils/index.ts +1 -1
|
@@ -104,7 +104,7 @@ export default (props: MenuProps) => {
|
|
|
104
104
|
target_height,
|
|
105
105
|
} = getLayoutInfos()
|
|
106
106
|
|
|
107
|
-
const
|
|
107
|
+
const layout = () => {
|
|
108
108
|
if (alignHorizontal == 'left') {
|
|
109
109
|
if (target_width + x > deviceWidth) {
|
|
110
110
|
return {
|
|
@@ -132,17 +132,17 @@ export default (props: MenuProps) => {
|
|
|
132
132
|
}
|
|
133
133
|
if (alignVertical == 'bottom') {
|
|
134
134
|
y = y + 10
|
|
135
|
-
return
|
|
135
|
+
return layout()
|
|
136
136
|
} else {
|
|
137
137
|
y = (StatusBar.currentHeight || 0) + _container.current.y - target_height - 10
|
|
138
|
-
return
|
|
138
|
+
return layout()
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
const show = () => {
|
|
144
144
|
// console.log('_container', _container.current, StatusBar.currentHeight)
|
|
145
|
-
if(props.data == undefined || props.data?.length == 0) return
|
|
145
|
+
if (props.data == undefined || props.data?.length == 0) return
|
|
146
146
|
showPopoverView({
|
|
147
147
|
content: (
|
|
148
148
|
<TouchableOpacity
|
package/package.json
CHANGED
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-07-
|
|
5
|
+
* @LastEditTime: 2022-07-18 16:28:37
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/README.md
|
|
7
7
|
-->
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ import '@aks-dev/easyui/screen/text-fit'
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
31
|
+ Badge
|
|
32
|
-
+
|
|
32
|
+
+ Hud
|
|
33
33
|
+ Modal
|
|
34
34
|
+ EchartsView
|
|
35
35
|
+ MutiPictureView
|
|
@@ -55,6 +55,23 @@ import '@aks-dev/easyui/screen/text-fit'
|
|
|
55
55
|
|callTelephone|拨打电话|
|
|
56
56
|
|randomcolor|获取随机色|
|
|
57
57
|
|syncLoop|同步循环|
|
|
58
|
+
|encryptMobilePhoneNumber|手机号码加星|
|
|
59
|
+
|isObject|判断对象|
|
|
60
|
+
|isArray|判断数组|
|
|
61
|
+
|isNumber|判断数字|
|
|
62
|
+
|isNull|判断null|
|
|
63
|
+
|isUndefined|判断undefined|
|
|
64
|
+
|isObjectValueEqual|判断两个对象是否相同|
|
|
65
|
+
|deepEqual|深度比较两个对象|
|
|
66
|
+
|deepClone|深拷贝|
|
|
67
|
+
|isPhoneNumber|判断手机号码|
|
|
68
|
+
|toDateFriendly|转成友好时间|
|
|
69
|
+
|isChainChar|是否包含[a-z]|
|
|
70
|
+
|isHaveChartCount|包含[a-z]数量|
|
|
71
|
+
|isHaveNumberCount|包含[0-9]数量|
|
|
72
|
+
|isHaveChinese|是否包含汉字|
|
|
73
|
+
|isHaveEmojiCharact|是否包含表情|
|
|
74
|
+
|
|
58
75
|
|
|
59
76
|
### jsbridge
|
|
60
77
|
---
|
package/screen/px2sp.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: shiguo
|
|
3
|
+
* @Date: 2021-04-27 10:40:36
|
|
4
|
+
* @LastEditors: shiguo
|
|
5
|
+
* @LastEditTime: 2022-07-18 11:27:22
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/screen/px2sp.ts
|
|
7
|
+
*/
|
|
1
8
|
import { Dimensions, PixelRatio } from 'react-native';
|
|
2
9
|
const pixelRatio = PixelRatio.get();
|
|
3
10
|
const width = Dimensions.get('window').width; //设备的宽度
|
|
@@ -54,7 +61,8 @@ export const px2sp = (size: number) => {
|
|
|
54
61
|
return size * 1.25;
|
|
55
62
|
}
|
|
56
63
|
// catch larger phablet devices
|
|
57
|
-
|
|
64
|
+
|
|
65
|
+
return size * 1.3;
|
|
58
66
|
}
|
|
59
67
|
// if older device ie pixelRatio !== 2 || 3 || 3.5
|
|
60
68
|
return size;
|