@aks-dev/easyui 1.0.163 → 1.1.5

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.
Files changed (176) hide show
  1. package/dist/components/AnimationModal/AnimationModal.d.ts +27 -0
  2. package/dist/components/AnimationModal/AnimationModal.d.ts.map +1 -0
  3. package/dist/components/AnimationModal/AnimationModal.js +151 -0
  4. package/dist/components/Badge/Badge.d.ts +8 -0
  5. package/dist/components/Badge/Badge.d.ts.map +1 -0
  6. package/dist/components/Badge/Badge.js +35 -0
  7. package/dist/components/DottedLine/DottedLine.d.ts +10 -0
  8. package/dist/components/DottedLine/DottedLine.d.ts.map +1 -0
  9. package/dist/components/DottedLine/DottedLine.js +50 -0
  10. package/dist/components/EchartsView/EchartsView.d.ts +10 -0
  11. package/dist/components/EchartsView/EchartsView.d.ts.map +1 -0
  12. package/{lib/Echarts/EchartsView.tsx → dist/components/EchartsView/EchartsView.js} +74 -113
  13. package/dist/components/EchartsView/helper.d.ts +10 -0
  14. package/dist/components/EchartsView/helper.d.ts.map +1 -0
  15. package/{lib/Echarts/helper.tsx → dist/components/EchartsView/helper.js} +17 -24
  16. package/dist/components/Hud/AlertBottomView/AlertBottomView.d.ts +25 -0
  17. package/dist/components/Hud/AlertBottomView/AlertBottomView.d.ts.map +1 -0
  18. package/dist/components/Hud/AlertBottomView/AlertBottomView.js +174 -0
  19. package/dist/components/Hud/AlertSheetView/AlertSheetView.d.ts +19 -0
  20. package/dist/components/Hud/AlertSheetView/AlertSheetView.d.ts.map +1 -0
  21. package/dist/components/Hud/AlertSheetView/AlertSheetView.js +117 -0
  22. package/dist/components/Hud/AlertView/AlertView.d.ts +25 -0
  23. package/dist/components/Hud/AlertView/AlertView.d.ts.map +1 -0
  24. package/dist/components/Hud/AlertView/AlertView.js +184 -0
  25. package/dist/components/Hud/Hud.d.ts +11 -0
  26. package/dist/components/Hud/Hud.d.ts.map +1 -0
  27. package/dist/components/Hud/Hud.js +29 -0
  28. package/dist/components/Hud/Loading/Loading.d.ts +11 -0
  29. package/dist/components/Hud/Loading/Loading.d.ts.map +1 -0
  30. package/dist/components/Hud/Loading/Loading.js +66 -0
  31. package/dist/components/Hud/PopoverView/PopoverView.d.ts +17 -0
  32. package/dist/components/Hud/PopoverView/PopoverView.d.ts.map +1 -0
  33. package/dist/components/Hud/PopoverView/PopoverView.js +47 -0
  34. package/dist/components/Hud/Scanner/Scanner.d.ts +12 -0
  35. package/dist/components/Hud/Scanner/Scanner.d.ts.map +1 -0
  36. package/dist/components/Hud/Scanner/Scanner.js +301 -0
  37. package/dist/components/Hud/Toast/Toast.d.ts +9 -0
  38. package/dist/components/Hud/Toast/Toast.d.ts.map +1 -0
  39. package/dist/components/Hud/Toast/Toast.js +71 -0
  40. package/dist/components/MenuView/MenuView.d.ts +21 -0
  41. package/dist/components/MenuView/MenuView.d.ts.map +1 -0
  42. package/dist/components/MenuView/MenuView.js +184 -0
  43. package/dist/components/Modal/Modal.d.ts +2 -0
  44. package/dist/components/Modal/Modal.d.ts.map +1 -0
  45. package/{lib/Modal/Modal.tsx → dist/components/Modal/Modal.js} +1 -4
  46. package/{lib/MutiPictureView/index.ts → dist/components/MutiPictureView/MutiPictureView.d.ts} +18 -31
  47. package/dist/components/MutiPictureView/MutiPictureView.d.ts.map +1 -0
  48. package/dist/components/MutiPictureView/MutiPictureView.js +243 -0
  49. package/dist/components/PictureViewer/PictureViewer.d.ts +17 -0
  50. package/dist/components/PictureViewer/PictureViewer.d.ts.map +1 -0
  51. package/dist/components/PictureViewer/PictureViewer.js +54 -0
  52. package/dist/components/RefreshList/RefreshList.d.ts +45 -0
  53. package/dist/components/RefreshList/RefreshList.d.ts.map +1 -0
  54. package/dist/components/RefreshList/RefreshList.js +155 -0
  55. package/dist/components/RichText/RichText.d.ts +12 -0
  56. package/dist/components/RichText/RichText.d.ts.map +1 -0
  57. package/dist/components/RichText/RichText.js +56 -0
  58. package/dist/components/StickHeaderView/StickHeaderView.d.ts +15 -0
  59. package/dist/components/StickHeaderView/StickHeaderView.d.ts.map +1 -0
  60. package/dist/components/StickHeaderView/StickHeaderView.js +37 -0
  61. package/{lib/TableCell/index.ts → dist/components/TableCell/TableCell.d.ts} +8 -30
  62. package/dist/components/TableCell/TableCell.d.ts.map +1 -0
  63. package/dist/components/TableCell/TableCell.js +97 -0
  64. package/dist/components/TextInputArea/TextInputArea.d.ts +17 -0
  65. package/dist/components/TextInputArea/TextInputArea.d.ts.map +1 -0
  66. package/dist/components/TextInputArea/TextInputArea.js +65 -0
  67. package/dist/components/WithLoadingContainer/WithLoadingContainer.d.ts +23 -0
  68. package/dist/components/WithLoadingContainer/WithLoadingContainer.d.ts.map +1 -0
  69. package/dist/components/WithLoadingContainer/WithLoadingContainer.js +77 -0
  70. package/dist/index.d.ts +23 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +32 -0
  73. package/dist/jsbridge/RNEasyui.d.ts +23 -0
  74. package/dist/jsbridge/RNEasyui.d.ts.map +1 -0
  75. package/dist/jsbridge/RNEasyui.js +46 -0
  76. package/dist/jsbridge/UpgradeModule.d.ts +26 -0
  77. package/dist/jsbridge/UpgradeModule.d.ts.map +1 -0
  78. package/{jsbridge/UpgradeModule.ts → dist/jsbridge/UpgradeModule.js} +25 -23
  79. package/dist/jsbridge/index.d.ts +3 -0
  80. package/dist/jsbridge/index.d.ts.map +1 -0
  81. package/{jsbridge/index.ts → dist/jsbridge/index.js} +2 -2
  82. package/dist/screen/index.d.ts +3 -0
  83. package/dist/screen/index.d.ts.map +1 -0
  84. package/{screen/index.ts → dist/screen/index.js} +2 -2
  85. package/{screen/index.d.ts → dist/screen/px2dp.d.ts} +6 -12
  86. package/dist/screen/px2dp.d.ts.map +1 -0
  87. package/dist/screen/px2dp.js +45 -0
  88. package/dist/screen/px2sp.d.ts +2 -0
  89. package/dist/screen/px2sp.d.ts.map +1 -0
  90. package/{screen/px2sp.ts → dist/screen/px2sp.js} +13 -20
  91. package/dist/screen/text-fit.d.ts +5 -0
  92. package/dist/screen/text-fit.d.ts.map +1 -0
  93. package/{screen/text-fit.ts → dist/screen/text-fit.js} +10 -20
  94. package/dist/utils/index.d.ts +3 -0
  95. package/dist/utils/index.d.ts.map +1 -0
  96. package/{utils/index.ts → dist/utils/index.js} +2 -2
  97. package/{utils/index.d.ts → dist/utils/lazy.d.ts} +15 -53
  98. package/dist/utils/lazy.d.ts.map +1 -0
  99. package/{utils/lazy.ts → dist/utils/lazy.js} +164 -165
  100. package/dist/utils/mode.d.ts +24 -0
  101. package/dist/utils/mode.d.ts.map +1 -0
  102. package/dist/utils/mode.js +50 -0
  103. package/package.json +32 -22
  104. package/readme.md +3 -3
  105. package/android/.DS_Store +0 -0
  106. package/android/src/.DS_Store +0 -0
  107. package/android/src/main/.DS_Store +0 -0
  108. package/android/src/main/java/.DS_Store +0 -0
  109. package/android/src/main/java/com/.DS_Store +0 -0
  110. package/android/src/main/java/com/easyui/.DS_Store +0 -0
  111. package/i.sh +0 -23
  112. package/ios/.DS_Store +0 -0
  113. package/ios/assets/.DS_Store +0 -0
  114. package/ios/views/.DS_Store +0 -0
  115. package/jsbridge/RNEasyui.ts +0 -42
  116. package/jsbridge/index.d.ts +0 -67
  117. package/lib/.DS_Store +0 -0
  118. package/lib/AnimationModal/AnimationModal.tsx +0 -201
  119. package/lib/AnimationModal/index.d.ts +0 -41
  120. package/lib/Badge/Badge.tsx +0 -40
  121. package/lib/Badge/index.ts +0 -21
  122. package/lib/DottedLine/DottedLine.tsx +0 -66
  123. package/lib/DottedLine/index.ts +0 -18
  124. package/lib/Echarts/demo.tsx +0 -235
  125. package/lib/Echarts/index.ts +0 -29
  126. package/lib/Hud/.DS_Store +0 -0
  127. package/lib/Hud/AlertBottomView/AlertBottomView.tsx +0 -228
  128. package/lib/Hud/AlertBottomView/index.d.ts +0 -42
  129. package/lib/Hud/AlertSheetView/AlertSheetView.tsx +0 -179
  130. package/lib/Hud/AlertSheetView/index.d.ts +0 -35
  131. package/lib/Hud/AlertView/AlertView.tsx +0 -234
  132. package/lib/Hud/AlertView/index.d.ts +0 -46
  133. package/lib/Hud/Hud.tsx +0 -67
  134. package/lib/Hud/Loading/Loading.tsx +0 -87
  135. package/lib/Hud/Loading/index.d.ts +0 -38
  136. package/lib/Hud/PopoverView/PopoverView.tsx +0 -66
  137. package/lib/Hud/PopoverView/index.d.ts +0 -39
  138. package/lib/Hud/Scanner/Scanner.tsx +0 -250
  139. package/lib/Hud/Scanner/index.d.ts +0 -42
  140. package/lib/Hud/Toast/Toast.tsx +0 -86
  141. package/lib/Hud/Toast/index.d.ts +0 -22
  142. package/lib/Hud/index.ts +0 -20
  143. package/lib/MenuView/MenuView.tsx +0 -252
  144. package/lib/MenuView/index.ts +0 -31
  145. package/lib/Modal/index.ts +0 -10
  146. package/lib/MutiPictureView/MutiPictureView.tsx +0 -259
  147. package/lib/PictureViewer/PictureViewer.tsx +0 -80
  148. package/lib/PictureViewer/index.ts +0 -26
  149. package/lib/RefreshList/RefreshList.tsx +0 -235
  150. package/lib/RefreshList/demo.tsx +0 -30
  151. package/lib/RefreshList/demo1.tsx +0 -60
  152. package/lib/RefreshList/demo2.tsx +0 -46
  153. package/lib/RefreshList/index.ts +0 -84
  154. package/lib/RichText/RichText.tsx +0 -82
  155. package/lib/RichText/index.ts +0 -21
  156. package/lib/StickHeaderView/StickHeaderView.tsx +0 -65
  157. package/lib/StickHeaderView/demo.tsx +0 -104
  158. package/lib/StickHeaderView/index.ts +0 -26
  159. package/lib/TableCell/TableCell.tsx +0 -118
  160. package/lib/TextInputArea/TextInputArea.tsx +0 -89
  161. package/lib/TextInputArea/index.d.ts +0 -33
  162. package/lib/WithLoadingContainer/WithLoadingContainer.tsx +0 -93
  163. package/lib/WithLoadingContainer/index.ts +0 -36
  164. package/screen/px2dp.ts +0 -51
  165. package/src/index.d.ts +0 -42
  166. package/src/index.ts +0 -54
  167. package/utils/mode.ts +0 -48
  168. /package/{lib/Hud/Scanner → dist/components/Hud/Scanner/assets}/flashlight-blue.png +0 -0
  169. /package/{lib/Hud/Scanner → dist/components/Hud/Scanner/assets}/flashlight-white.png +0 -0
  170. /package/{lib/Hud/Scanner → dist/components/Hud/Scanner/assets}/icon_back_white.png +0 -0
  171. /package/{lib/MutiPictureView → dist/components/MutiPictureView/assets}/icon_add_image.png +0 -0
  172. /package/{lib/MutiPictureView → dist/components/MutiPictureView/assets}/icon_del_image.png +0 -0
  173. /package/{lib/TableCell → dist/components/TableCell/assets}/back.png +0 -0
  174. /package/{lib/WithLoadingContainer → dist/components/WithLoadingContainer/assets}/loading.gif +0 -0
  175. /package/{lib/WithLoadingContainer → dist/components/WithLoadingContainer/assets}/loading3.gif +0 -0
  176. /package/{lib → dist/components}/index.md +0 -0
@@ -5,38 +5,40 @@
5
5
  * @LastEditTime: 2023-03-23 15:15:06
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/UpgradeModule.ts
7
7
  */
8
- import { NativeModules, PermissionsAndroid, Platform } from 'react-native';
9
-
8
+ import { NativeModules, PermissionsAndroid, Platform } from "react-native";
10
9
  const { UpgradeModule } = NativeModules;
11
-
12
- import type { UpgradeOptions } from './index.d'
13
-
10
+ /**
11
+ * @description: 获取App版本号
12
+ * @param {*}
13
+ * @return {*}
14
+ */
14
15
  export const getAppVersion = () => UpgradeModule.getAppVersion();
15
-
16
+ /**
17
+ * @description: 获取操作系统版本
18
+ *
19
+ react-native-device-info
20
+ * @return {*}
21
+ */
16
22
  export const getOSVersion = () => UpgradeModule.getOSVersion();
17
-
18
- export const upgrade = async (options: UpgradeOptions ) => {
19
- const { title = '提示' } = options
20
-
21
- if (Platform.OS == 'android') {
23
+ export const upgrade = async (options) => {
24
+ const { title = "提示" } = options;
25
+ if (Platform.OS == "android") {
22
26
  try {
23
27
  const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE, {
24
- title: '提示',
28
+ title: "提示",
25
29
  message: "应用升级需要获取APP的写入权限",
26
30
  buttonNeutral: "稍后再询问",
27
31
  buttonNegative: "取消",
28
- buttonPositive: "确定"
29
- })
32
+ buttonPositive: "确定",
33
+ });
30
34
  if (granted === PermissionsAndroid.RESULTS.GRANTED) {
31
- return UpgradeModule.upgrade(options)
35
+ return UpgradeModule.upgrade(options);
32
36
  }
33
-
34
- return Promise.reject("没有应用升级权限!")
35
- } catch (err) {
36
- return Promise.reject("请求权限异常!")
37
+ return Promise.reject("没有应用升级权限!");
38
+ }
39
+ catch (err) {
40
+ return Promise.reject("请求权限异常!");
37
41
  }
38
-
39
42
  }
40
-
41
- return UpgradeModule.upgrade(options)
42
- }
43
+ return UpgradeModule.upgrade(options);
44
+ };
@@ -0,0 +1,3 @@
1
+ export * from './RNEasyui';
2
+ export * from './UpgradeModule';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsbridge/index.ts"],"names":[],"mappings":"AAOA,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA"}
@@ -5,5 +5,5 @@
5
5
  * @LastEditTime: 2023-03-23 15:14:55
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/index.ts
7
7
  */
8
- export * from './RNEasyui'
9
- export * from './UpgradeModule'
8
+ export * from './RNEasyui';
9
+ export * from './UpgradeModule';
@@ -0,0 +1,3 @@
1
+ export * from '../screen/px2dp';
2
+ export * from '../screen/px2sp';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screen/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
@@ -6,5 +6,5 @@
6
6
  * @FilePath: /@aks-dev/easyui/screen/index.ts
7
7
  */
8
8
  /// 全局适配
9
- export * from '../screen/px2dp'
10
- export * from '../screen/px2sp'
9
+ export * from '../screen/px2dp';
10
+ export * from '../screen/px2sp';
@@ -1,17 +1,10 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:25:14
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-31 18:34:57
6
- * @FilePath: /@aks-dev/easyui/screen/index.ts
7
- */
8
- export declare const deviceWidth: number; //设备的宽度
9
- export declare const deviceHeight: number; //设备的高度
1
+ /**设备宽度,单位 dp */
2
+ export declare const deviceWidth: number;
3
+ export declare const deviceHeight: number;
10
4
  export declare const isAndroid: boolean;
11
5
  export declare const isIos: boolean;
12
- export declare const px2dp: (uiElePx: number) => number;
13
- export declare const px2sp: (fontSize: number) => number;
14
6
  export declare const isiPhoneX: boolean;
7
+ export declare const px2dp: (uiElePx: number) => number;
15
8
  /**
16
9
  * @description: 状态栏的高度
17
10
  * @param {*}
@@ -23,4 +16,5 @@ export declare const statusBarHeight: number;
23
16
  * @param {*}
24
17
  * @return {*}
25
18
  */
26
- export declare const navigationBarHeight: number;
19
+ export declare const navigationBarHeight: number;
20
+ //# sourceMappingURL=px2dp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"px2dp.d.ts","sourceRoot":"","sources":["../../src/screen/px2dp.ts"],"names":[],"mappings":"AASA,gBAAgB;AAChB,eAAO,MAAM,WAAW,QAAiC,CAAC;AAC1D,eAAO,MAAM,YAAY,QAAkC,CAAC;AAC5D,eAAO,MAAM,SAAS,SAA4B,CAAC;AACnD,eAAO,MAAM,KAAK,SAAwB,CAAC;AAC3C,eAAO,MAAM,SAAS,SAA8B,CAAC;AAUrD,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,WAEpC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAIxB,CAAC;AACL;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAG5B,CAAC"}
@@ -0,0 +1,45 @@
1
+ /*
2
+ * @Author: shiguo
3
+ * @Date: 2022-04-18 14:32:25
4
+ * @LastEditors: shiguo
5
+ * @LastEditTime: 2022-09-09 10:35:02
6
+ * @FilePath: /@aks-dev/easyui/screen/px2dp.ts
7
+ */
8
+ import { Dimensions, Platform, StatusBar } from "react-native";
9
+ /**设备宽度,单位 dp */
10
+ export const deviceWidth = Dimensions.get("screen").width; //设备的宽度
11
+ export const deviceHeight = Dimensions.get("screen").height; //设备的高度
12
+ export const isAndroid = Platform.OS === "android";
13
+ export const isIos = Platform.OS === "ios";
14
+ export const isiPhoneX = isIos && deviceHeight > 736;
15
+ /**
16
+ * 375px/667px
17
+ * */
18
+ const uiWidthPx = 375;
19
+ // const pixelRatio = PixelRatio.get()
20
+ // const deviceWidthPx = PixelRatio.getPixelSizeForLayoutSize(deviceWidth);
21
+ export const px2dp = (uiElePx) => {
22
+ return Math.round((uiElePx * deviceWidth) / uiWidthPx);
23
+ };
24
+ /**
25
+ * @description: 状态栏的高度
26
+ * @param {*}
27
+ * @return {*}
28
+ */
29
+ export const statusBarHeight = (() => {
30
+ if (isAndroid)
31
+ return StatusBar.currentHeight || 24;
32
+ if (isiPhoneX)
33
+ return 44;
34
+ return 20;
35
+ })();
36
+ /**
37
+ * @description: 顶部导航条的高度,高度不包含statusBarHeight
38
+ * @param {*}
39
+ * @return {*}
40
+ */
41
+ export const navigationBarHeight = (() => {
42
+ if (isAndroid)
43
+ return 56;
44
+ return 44;
45
+ })();
@@ -0,0 +1,2 @@
1
+ export declare const px2sp: (size: number) => number;
2
+ //# sourceMappingURL=px2sp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"px2sp.d.ts","sourceRoot":"","sources":["../../src/screen/px2sp.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,WA+DjC,CAAC"}
@@ -7,17 +7,14 @@
7
7
  */
8
8
  import { Dimensions, PixelRatio } from 'react-native';
9
9
  const pixelRatio = PixelRatio.get();
10
- const width = Dimensions.get('window').width; //设备的宽度
11
- const height = Dimensions.get('window').height; //设备的高度
12
-
13
- export const px2sp = (size: number) => {
14
-
15
- // console.log({
16
- // pixelRatio,
17
- // width,
18
- // height
19
- // })
20
-
10
+ const width = Dimensions.get('window').width; //设备的宽度
11
+ const height = Dimensions.get('window').height; //设备的高度
12
+ export const px2sp = (size) => {
13
+ // console.log({
14
+ // pixelRatio,
15
+ // width,
16
+ // height
17
+ // })
21
18
  if (pixelRatio === 2) {
22
19
  // iphone 5s and older Androids
23
20
  if (width < 360) {
@@ -27,7 +24,8 @@ export const px2sp = (size: number) => {
27
24
  if (height < 667) {
28
25
  return size;
29
26
  // iphone 6-6s
30
- } else if (height >= 667 && height <= 735) {
27
+ }
28
+ else if (height >= 667 && height <= 735) {
31
29
  return size * 1.15;
32
30
  }
33
31
  // older phablets
@@ -60,21 +58,16 @@ export const px2sp = (size: number) => {
60
58
  // Catch other smaller android height sizings
61
59
  }
62
60
  if (height < 667) {
63
- return size * 1.15;//older:1.20
61
+ return size * 1.15; //older:1.20
64
62
  // catch in-between size Androids and scale font up
65
63
  // a tad but not too much
66
64
  }
67
65
  if (height >= 667 && height <= 735) {
68
- return size * 1.20;//older:1.25
66
+ return size * 1.20; //older:1.25
69
67
  }
70
68
  // catch larger phablet devices
71
-
72
- return size * 1.25;//older:1.30
69
+ return size * 1.25; //older:1.30
73
70
  }
74
71
  // if older device ie pixelRatio !== 2 || 3 || 3.5
75
72
  return size;
76
73
  };
77
-
78
-
79
-
80
-
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 全局配置Text
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=text-fit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-fit.d.ts","sourceRoot":"","sources":["../../src/screen/text-fit.ts"],"names":[],"mappings":"AAOA;;GAEG"}
@@ -8,11 +8,10 @@
8
8
  /**
9
9
  * 全局配置Text
10
10
  */
11
-
12
11
  import React from 'react';
13
12
  import { Platform, Text as Text_spaceName, TextInput as TextInput_spaceName } from 'react-native';
14
- const Text: any = Text_spaceName
15
- const TextInput: any = TextInput_spaceName
13
+ const Text = Text_spaceName;
14
+ const TextInput = TextInput_spaceName;
16
15
  const textDefaultStyle = {
17
16
  ...Platform.select({
18
17
  android: { fontFamily: 'DroidSansFallback' }
@@ -21,18 +20,13 @@ const textDefaultStyle = {
21
20
  paddingVertical: 0,
22
21
  paddingHorizontal: 0,
23
22
  };
24
-
25
-
26
-
27
23
  const textRender = Text.render;
28
- Text.render = function (...args: any[]) {
24
+ Text.render = function (...args) {
29
25
  const origin = textRender.call(this, ...args);
30
26
  return React.cloneElement(origin, {
31
27
  style: [textDefaultStyle, origin.props.style]
32
28
  });
33
29
  };
34
-
35
-
36
30
  const textInputDefaultStyle = {
37
31
  defaultProps: false,
38
32
  paddingVertical: 0,
@@ -40,21 +34,17 @@ const textInputDefaultStyle = {
40
34
  autoCapitalize: "none", //不自动大写
41
35
  autoCorrect: false, //不自动纠正拼写
42
36
  };
43
-
44
37
  const textInputRender = TextInput.render;
45
- TextInput.render = function (...args: any[]) {
38
+ TextInput.render = function (...args) {
46
39
  const origin = textInputRender.call(this, ...args);
47
40
  return React.cloneElement(origin, {
48
41
  style: [textInputDefaultStyle, origin.props.style]
49
42
  });
50
43
  };
51
-
52
-
53
-
54
44
  /**关闭字体缩放 */
55
- if (!Text.defaultProps) Text.defaultProps = {};
56
- if (!TextInput.defaultProps) TextInput.defaultProps = {};
57
- Text.defaultProps.allowFontScaling = false
58
- TextInput.defaultProps.allowFontScaling = false
59
-
60
-
45
+ if (!Text.defaultProps)
46
+ Text.defaultProps = {};
47
+ if (!TextInput.defaultProps)
48
+ TextInput.defaultProps = {};
49
+ Text.defaultProps.allowFontScaling = false;
50
+ TextInput.defaultProps.allowFontScaling = false;
@@ -0,0 +1,3 @@
1
+ export * from '../utils/mode';
2
+ export * from '../utils/lazy';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAOA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
@@ -5,5 +5,5 @@
5
5
  * @LastEditTime: 2023-03-23 15:08:21
6
6
  * @FilePath: /@aks-dev/easyui/utils/index.ts
7
7
  */
8
- export * from '../utils/mode'
9
- export * from '../utils/lazy'
8
+ export * from '../utils/mode';
9
+ export * from '../utils/lazy';
@@ -1,65 +1,22 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:25:43
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-02-28 12:07:51
6
- * @FilePath: /@aks-dev/easyui/utils/index.ts
7
- */
8
-
9
- import * as rn from 'react-native';
10
-
11
1
  /**
12
2
  * @description: 睡眠时间
13
3
  * @param {*}毫秒值
14
4
  * @return {*}
15
5
  */
16
- type TArgs = (args: void) => void;
17
- export declare const sleep: (msec?: number) => Promise<TArgs>;
18
-
19
-
20
- /**
21
- * @description: 通过手势关闭键盘
22
- * @return {*}
23
- */
24
- export declare const keyboardDismissHandlers: rn.GestureResponderHandlers;
25
-
26
- export type CallBack = (...args: any[]) => void;
27
-
28
-
29
-
30
-
31
- /**
32
- * @description: 手势动作回调
33
- * @param {*}
34
- * @return {*}
35
- */
36
- export declare const panHandlersCallback: (props: { GrantCallback: CallBack, MoveCallback: CallBack, ReleaseCallback: CallBack }) => void;
37
-
38
- /**
39
- * @description: 拨打电话
40
- * @param {number} phone
41
- * @return {*}
42
- */
43
- export declare const callTelephone: (phone: number | string) => void;
44
-
6
+ export declare const sleep: (msec?: number) => Promise<unknown>;
45
7
  /**
46
8
  * @description: 获取随机色
47
9
  * @param {*}
48
10
  * @return {*}
49
11
  */
50
12
  export declare const randomcolor: () => string;
51
-
52
-
53
-
54
- export type SyncLoopCallBack = (item: any, index: number) => void;
13
+ type SyncLoopCallBack = (item: any, index: number) => void;
55
14
  /**
56
15
  * @description: 同步循环
57
16
  * @param {*} dataList:数据源
58
17
  * @return {*}
59
18
  */
60
19
  export declare const syncLoop: (dataList: any[], callback: SyncLoopCallBack) => Promise<string>;
61
-
62
-
63
20
  /**
64
21
  * @description: 对11位手机号码加*
65
22
  * @return {*}
@@ -76,21 +33,26 @@ export declare const isNumber: (exp: any) => boolean;
76
33
  export declare const isNull: (exp: any) => boolean;
77
34
  export declare const isNullObject: (obj: any) => boolean;
78
35
  export declare const isUndefined: (exp: any) => boolean;
36
+ /**判断两个对象是否相同 */
79
37
  export declare const isObjectValueEqual: (a: any, b: any) => boolean;
80
38
  export declare const deepEqual: (x: any, y: any) => boolean;
81
39
  export declare function deepClone(target: any): any;
82
40
  export declare const isPhoneNumber: (str: string) => boolean;
41
+ /**
42
+ *
43
+ * @param dateStr yyyy-MM-dd HH:mm:ss
44
+ * @returns {string}
45
+ */
83
46
  export declare const toDateFriendly: (dateStr: string) => string;
84
47
  export declare const isChainChar: (str: string) => boolean;
85
- export declare const isHaveChartCount: (str: string) => number;
86
- export declare const isHaveNumberCount: (str: string) => number;
48
+ export declare const isHaveChartCount: (str: string) => number | undefined;
49
+ export declare const isHaveNumberCount: (str: string) => number | undefined;
87
50
  export declare const isHaveChinese: (text: string) => boolean;
88
51
  export declare const isHaveEmojiCharact: (substring: string) => boolean;
89
-
90
-
91
52
  /**
92
- * @description: 获得32位随机字符
93
- * @return {*}
94
- */
53
+ * @description: 获得32位随机字符
54
+ * @return {*}
55
+ */
95
56
  export declare const getUuid: () => string;
96
-
57
+ export {};
58
+ //# sourceMappingURL=lazy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/utils/lazy.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,qBAIlC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,WAAW,cAEvB,CAAC;AAEF,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAC3D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAU,UAAU,GAAG,EAAE,EAAE,UAAU,gBAAgB,oBAazE,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,WAOpD,CAAC;AAEF;;;GAGG;AAGH,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,YAE/B,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,MAAM,GAAI,KAAK,GAAG,YAE9B,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,KAAK,GAAG,YAOpC,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,YAEnC,CAAC;AACF,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YAqBhD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YA4CvC,CAAC;AAGF,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CA+B1C;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,YAMxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,WAmC7C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,YAKtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,uBAK3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,uBAK5C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,YAOzC,CAAC;AACF,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,YAyCnD,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,OAAO,cAYnB,CAAC"}