@aks-dev/easyui 1.0.108 → 1.0.111

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.
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-24 14:27:02
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-09-09 10:57:45
5
+ * @LastEditTime: 2022-10-28 12:10:20
6
6
  * @FilePath: /@aks-dev/easyui/lib/Hud/PopoverView/PopoverView.tsx
7
7
  */
8
8
  import React, { useImperativeHandle, useState } from 'react';
@@ -41,7 +41,7 @@ export const PopoverView = React.forwardRef<PopoverViewOptions.RefAttributes, {}
41
41
  return null;
42
42
 
43
43
  return (
44
- <TouchableOpacity activeOpacity={1} style={[styles.container, options?.style]} onPress={e => {
44
+ <TouchableOpacity activeOpacity={1} style={[styles.container, options?.style]} disabled={options?.disabled} onPress={e => {
45
45
  setVisible(false);
46
46
  setOptions(undefined)
47
47
  // e.stopPropagation()
@@ -3,8 +3,8 @@
3
3
  * @Author: shiguo
4
4
  * @Date: 2022-04-24 14:27:02
5
5
  * @LastEditors: shiguo
6
- * @LastEditTime: 2022-09-09 10:57:07
7
- * @FilePath: /@aks-dev/easyui/lib/Hud/PopoverView/index.ts
6
+ * @LastEditTime: 2022-10-28 12:09:52
7
+ * @FilePath: /@aks-dev/easyui/lib/Hud/PopoverView/index.d.ts
8
8
  */
9
9
  import * as React from 'react'
10
10
 
@@ -14,6 +14,7 @@ import {StyleProp,ViewStyle} from 'react-native'
14
14
  export type PopoverViewOptions = {
15
15
  content: React.ReactNode;
16
16
  style: StyleProp<ViewStyle>;
17
+ disabled:boolean;
17
18
  }
18
19
 
19
20
 
@@ -215,8 +215,10 @@ export default (props: MenuProps) => {
215
215
  }
216
216
 
217
217
  return (
218
- <TouchableOpacity ref={containerRef as any} onPress={e => show()} style={props.style} >
219
- {props.children}
220
- </TouchableOpacity>
218
+ <TouchableOpacity
219
+ ref={containerRef as any}
220
+ onPress={e => show()}
221
+ {...props}
222
+ />
221
223
  )
222
224
  }
@@ -2,11 +2,10 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-26 11:30:34
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-04-26 14:34:52
6
- * @FilePath: /@aks/easy/lib/Modal/Modal.tsx
5
+ * @LastEditTime: 2022-10-27 16:37:32
6
+ * @FilePath: /@aks-dev/easyui/lib/Modal/Modal.tsx
7
7
  */
8
8
 
9
9
 
10
10
 
11
-
12
- export { default as Modal, ModalProps } from 'react-native-modal'
11
+ export { default as Modal, ModalProps } from 'react-native-modal'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.108",
3
+ "version": "1.0.111",
4
4
  "description": "工具箱",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",
package/screen/px2sp.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2021-04-27 10:40:36
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-18 11:27:22
5
+ * @LastEditTime: 2022-10-28 17:14:14
6
6
  * @FilePath: /@aks-dev/easyui/screen/px2sp.ts
7
7
  */
8
8
  import { Dimensions, PixelRatio } from 'react-native';
@@ -11,6 +11,13 @@ const width = Dimensions.get('window').width; //设备的宽度
11
11
  const height = Dimensions.get('window').height; //设备的高度
12
12
 
13
13
  export const px2sp = (size: number) => {
14
+
15
+ // console.log({
16
+ // pixelRatio,
17
+ // width,
18
+ // height
19
+ // })
20
+
14
21
  if (pixelRatio === 2) {
15
22
  // iphone 5s and older Androids
16
23
  if (width < 360) {
@@ -53,16 +60,16 @@ export const px2sp = (size: number) => {
53
60
  // Catch other smaller android height sizings
54
61
  }
55
62
  if (height < 667) {
56
- return size * 1.2;
63
+ return size * 1.15;//older:1.20
57
64
  // catch in-between size Androids and scale font up
58
65
  // a tad but not too much
59
66
  }
60
67
  if (height >= 667 && height <= 735) {
61
- return size * 1.25;
68
+ return size * 1.20;//older:1.25
62
69
  }
63
70
  // catch larger phablet devices
64
71
 
65
- return size * 1.3;
72
+ return size * 1.25;//older:1.30
66
73
  }
67
74
  // if older device ie pixelRatio !== 2 || 3 || 3.5
68
75
  return size;