@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
package/readme.md CHANGED
@@ -2,11 +2,11 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-25 17:57:29
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-18 16:28:37
5
+ * @LastEditTime: 2022-07-18 16:28:371
6
6
  * @FilePath: /@aks-dev/easyui/README.md
7
7
  -->
8
8
 
9
- ### 安装
9
+ ### install
10
10
 
11
11
  `$ npm install @aks-dev/easyui --save`
12
12
 
@@ -47,7 +47,7 @@ import '@aks-dev/easyui/screen/text-fit'
47
47
 
48
48
  ### utils
49
49
  ---
50
- |函数|作用|
50
+ |函数|功能|
51
51
  |:----|:----|
52
52
  |sleep|睡眠|
53
53
  |keyboardDismissHandlers|通过手势关闭键盘|
package/android/.DS_Store DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
package/i.sh DELETED
@@ -1,23 +0,0 @@
1
-
2
- ###
3
- # @Author: shiguo
4
- # @Date: 2022-09-26 17:09:38
5
- # @LastEditors: shiguo
6
- # @LastEditTime: 2023-09-15 17:15:13
7
- # @FilePath: /@aks-dev/easyui/i.sh
8
- ###
9
- # echo "Shell 传递参数实例!";
10
- # echo "执行的文件名:$0";
11
- # echo "第一个参数为:$1";
12
- # echo "第二个参数为:$2";
13
- # echo "第三个参数为:$3";
14
- # ./i.sh 测试更新注视
15
-
16
-
17
- #chmod u+x *.sh
18
- git add .
19
- git commit -m $1
20
- # git push origin master
21
- git push --force origin master
22
- npm version patch
23
- npm publish
package/ios/.DS_Store DELETED
Binary file
Binary file
Binary file
@@ -1,42 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:23:01
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-03-10 14:05:17
6
- * @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
7
- */
8
-
9
- import { Dimensions, NativeModules, Platform } from 'react-native';
10
-
11
- const { RNEasyui } = NativeModules;
12
-
13
-
14
-
15
- export const getDeviceBrand = () => RNEasyui.getDeviceBrand();
16
-
17
-
18
-
19
- export const getStatusBarHeight = () => {
20
- if (Platform.OS == 'android') return RNEasyui.getStatusBarHeight();
21
-
22
- const deviceHeight = Dimensions.get('window').height;
23
- const isiPhoneX = Platform.OS == 'ios' && (deviceHeight > 736)
24
- if (isiPhoneX) return Promise.resolve(44)
25
- return Promise.resolve(20)
26
- }
27
-
28
- export const getNavigationBarHeight = () => {
29
- if (Platform.OS == 'android') return RNEasyui.getNavigationBarHeight();
30
-
31
- return Promise.resolve(44)
32
-
33
- }
34
-
35
-
36
- export const gotoDesktop = () => {
37
- if (Platform.OS == 'android') RNEasyui?.gotoDesktop();
38
- }
39
-
40
-
41
-
42
-
@@ -1,67 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-19 10:23:01
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-10-24 16:38:59
6
- * @FilePath: /@aks-dev/easyui/jsbridge/index.ts
7
- */
8
-
9
-
10
- /**
11
- * @description: 获取App版本号
12
- * @param {*}
13
- * @return {*}
14
- */
15
- export declare const getAppVersion: () => Promise<string>;
16
-
17
- /**
18
- * @description: 获取操作系统版本
19
- *
20
- react-native-device-info
21
- * @return {*}
22
- */
23
- export declare const getOSVersion: () => Promise<string>;
24
-
25
- /**
26
- * @description: 获取设备品牌
27
- * @return {*}
28
- */
29
- export declare const getDeviceBrand: () => Promise<string>;
30
-
31
-
32
- export declare type UpgradeOptions = {
33
- title?: string;
34
- version: string;
35
- downloadUrl: string;
36
- note: string;
37
- force: boolean;
38
- };
39
-
40
- /**
41
- * @description: app升级
42
- * @return {*}
43
- */
44
- export declare const upgrade: (options: UpgradeOptions) => Promise<string>;
45
-
46
-
47
-
48
- /**
49
- * @deprecated 测量不准确,已放弃
50
- * @description: 获取status_bar_height
51
- * @return {*}
52
- */
53
- export declare const getStatusBarHeight: () => Promise<number>;
54
-
55
- /**
56
- * @deprecated 测量不准确,已放弃
57
- * @description: 获取navigation_bar_height
58
- * @return {*}
59
- */
60
- export declare const getNavigationBarHeight: () => Promise<number>;
61
-
62
-
63
- /**
64
- * only android
65
- * 返回桌面
66
- */
67
- export declare const gotoDesktop: ()=>void;
package/lib/.DS_Store DELETED
Binary file
@@ -1,201 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-05-17 15:22:06
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-09-27 15:17:15
6
- * @FilePath: /@aks-dev/easyui/lib/AnimationModal/AnimationModal.tsx
7
- */
8
-
9
- import * as React from "react";
10
- import { View, Animated, Easing, LayoutRectangle, PanResponder, StyleSheet, useWindowDimensions, BackHandler, MeasureOnSuccessCallback } from 'react-native';
11
- import type { AnimationModalProps } from '.';
12
- import * as utils from '../../utils/lazy';
13
- // type State = {
14
- // display: 'flex' | 'none';
15
- // }
16
- // type StateReducerProps = (state: State, action: Partial<State>) => State
17
-
18
-
19
-
20
-
21
- export const AnimationModal: React.ForwardRefExoticComponent<
22
- React.PropsWithoutRef<AnimationModalProps>
23
- & React.RefAttributes<AnimationModalProps.RefAttributes>
24
- >
25
- = React.forwardRef((props, ref) => {
26
- const {
27
- animationType = 'from-bottom',
28
- mask = false
29
- } = props || {}
30
-
31
- const { height } = useWindowDimensions()
32
-
33
- // const [state, dispatch] = React.useReducer<StateReducerProps>(
34
- // (state, action) => ({ ...state, ...action }),
35
- // {
36
- // display: 'none'
37
- // })
38
-
39
- const [display, setDisplay] = useCallbackState<'flex' | 'none'>('none')
40
-
41
- const animatedValue = React.useRef(new Animated.Value(0)).current;
42
- const timing = (value: number) => {
43
- Animated.timing(animatedValue, {
44
- toValue: value,
45
- duration: 350,
46
- useNativeDriver: true,
47
- easing: Easing.ease,
48
- }).start(({ finished }) => {
49
- /* 动画完成的回调函数 */
50
- });
51
- };
52
-
53
-
54
- const viewRef = React.useRef<{ measure: (callback: MeasureOnSuccessCallback) => void }>() as any
55
- const layoutRef = React.useRef<{
56
- /**:父容器的高度 */
57
- h0: number;
58
- /**:子容器的高度 */
59
- h1: number;
60
- }>({ h0: 0, h1: 0 })
61
- const getLayoutPromise = () => {
62
- return new Promise((resovle, reject) => {
63
- viewRef.current?.measure((...args: any[]) => {
64
- if (args.length == 6) {
65
- layoutRef.current.h1 = args[3]
66
- }
67
- resovle(args)
68
- })
69
- })
70
- }
71
-
72
-
73
-
74
- const init = React.useCallback(() => ({ show, hide, setData, getData }), [])
75
- React.useImperativeHandle<unknown, AnimationModalProps.RefAttributes>(ref, init, [])
76
- const dataRef = React.useRef<any>()
77
- const setData = (data?: any) => {
78
- dataRef.current = data
79
- return init()
80
- }
81
-
82
- const getData = () => dataRef.current
83
-
84
-
85
- const show = () => {
86
- setDisplay('flex', async () => {
87
- await utils.sleep(50)
88
- await getLayoutPromise()
89
- timing(-layoutRef.current?.h1)
90
- })
91
-
92
- return init()
93
- }
94
- const hide = () => {
95
- timing(0)
96
- setTimeout(() => {
97
- setDisplay('none')
98
- }, 300)
99
-
100
- return init()
101
- }
102
-
103
-
104
- React.useEffect(() => {
105
- let addEventListener = BackHandler.addEventListener("hardwareBackPress", () => {
106
- return display == 'flex'
107
- })
108
- return () => {
109
- addEventListener.remove()
110
- }
111
- }, [display])
112
-
113
-
114
-
115
- return (
116
- <View
117
- style={Object.assign({
118
- display: display
119
- }, styles.container, props.style)}
120
- {...PanResponder.create({
121
- onStartShouldSetPanResponder: (e, gestureState) => {
122
- let pageY = e.nativeEvent.pageY
123
- let topY = height - layoutRef.current.h1
124
- if (pageY <= topY && !mask) {
125
- return true
126
- }
127
- return false
128
- },
129
- onPanResponderGrant: (e, gestureState) => {
130
- // console.log({e})
131
- let pageY = e.nativeEvent.pageY
132
- let topY = height - layoutRef.current.h1
133
- if (pageY <= topY && !mask) {
134
- e.stopPropagation()
135
- hide()
136
- }
137
- }
138
- }).panHandlers}
139
- >
140
- <Animated.View
141
- style={Object.assign({}, styles.wrapper, { transform: [{ translateY: animatedValue }] })}
142
- // onLayout={e => {
143
- // let target: LayoutRectangle = e.nativeEvent.layout
144
- // layoutRef.current.h1 = target.height
145
- // }}
146
-
147
- ref={viewRef}
148
- >
149
- {props.children}
150
- </Animated.View>
151
- </View>
152
- )
153
- })
154
-
155
-
156
-
157
- const styles = StyleSheet.create({
158
- container: {
159
- position: 'absolute',
160
- left: 0,
161
- right: 0,
162
- top: 0,
163
- bottom: 0,
164
- zIndex: 999,
165
- // display: 'flex',
166
- flexDirection: 'column',
167
- backgroundColor: '#00000055',
168
- overflow: 'hidden',
169
- },
170
- wrapper: {
171
- position: 'absolute',
172
- display: 'flex',
173
- flexDirection: 'column',
174
- // backgroundColor: 'pink',
175
- width: '100%',
176
- top: '100%'
177
- },
178
- empty: {
179
- flex: 1, position: 'relative',
180
- // backgroundColor: 'cyan'
181
- }
182
- })
183
-
184
-
185
-
186
-
187
- const useCallbackState = <T,>(od: T): [T, (d: T, callback?: Function) => void] => {
188
- const cbRef = React.useRef<Function>()
189
- const [data, setData] = React.useState<T>(od)
190
- React.useEffect(() => {
191
- cbRef.current && cbRef.current(data)
192
- }, [data])
193
-
194
- return [
195
- data,
196
- (d: T, callback?: Function) => {
197
- cbRef.current = callback;
198
- setData(d)
199
- }
200
- ]
201
- }
@@ -1,41 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-05-18 17:26:41
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2023-09-27 15:12:59
6
- * @FilePath: /@aks-dev/easyui/lib/AnimationModal/index.d.ts
7
- */
8
- import { StyleProp, ViewStyle } from 'react-native';
9
-
10
-
11
- export type AnimationModalProps = {
12
- children: React.ReactNode;
13
- /**
14
- * 动画方向,默认 'from-bottom'
15
- * center-in 动画暂未实现
16
- * @deprecated
17
- */
18
- animationType?: 'from-bottom' | 'center-in';
19
- /**
20
- * 是否有遮罩,默认没有
21
- */
22
- mask?: boolean;
23
- style?:Pick<StyleProp<ViewStyle>,'backgroundColor'>;
24
- }
25
-
26
-
27
- declare namespace AnimationModalProps {
28
- type RefAttributes = {
29
- show: () => RefAttributes;
30
- hide: () => RefAttributes;
31
- setData: (data?: any) => RefAttributes;
32
- getData: () => any;
33
- }
34
- }
35
-
36
-
37
-
38
- export declare const AnimationModal: React.ForwardRefExoticComponent<
39
- React.PropsWithoutRef<AnimationModalProps>
40
- & React.RefAttributes<AnimationModalProps.RefAttributes>
41
- >;
@@ -1,40 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-21 14:40:29
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-08 15:40:21
6
- * @FilePath: /@aks-dev/easyui/lib/Badge/Badge.tsx
7
- */
8
- import React from 'react'
9
- import { View, Text, } from 'react-native'
10
- import { px2dp } from '../../screen/px2dp'
11
- import { px2sp } from '../../screen/px2sp'
12
-
13
-
14
- import type { BadgeProps } from '.'
15
-
16
-
17
-
18
- export const Badge: React.FC<BadgeProps>
19
- = (props) => {
20
- if (isNaN(+props.count) || Number(props.count) == 0) return <View />
21
- return (
22
-
23
- <View style={
24
- [
25
- {
26
- flexGrow: 0, flexShrink: 1, zIndex: 1,
27
- // paddingHorizontal: px2dp(0),
28
- height: px2dp(16), minWidth: px2dp(16), borderRadius: px2dp(8),
29
- justifyContent: 'center', alignItems: 'center',
30
- backgroundColor: 'red'
31
- },
32
- props.style
33
- ]
34
- } >
35
- <Text style={{ fontSize: px2sp(12), color: 'white', textAlign: 'center' }}> {props.count > 99 ? '+99' : props.count} </Text>
36
-
37
- </View>
38
- )
39
- }
40
-
@@ -1,21 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-21 14:43:14
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-08 15:40:30
6
- * @FilePath: /@aks-dev/easyui/lib/Badge/index.ts
7
- */
8
- import * as React from 'react'
9
- import { StyleProp, ViewStyle } from 'react-native'
10
-
11
-
12
-
13
-
14
-
15
- export declare type BadgeProps = {
16
- count: number | string;
17
- style?: StyleProp<ViewStyle>
18
- }
19
-
20
- export declare const Badge: React.FC<BadgeProps>
21
-
@@ -1,66 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-07-12 15:30:19
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-12 15:33:06
6
- * @FilePath: /@aks-dev/easyui/lib/DottedLine/DottedLine.tsx
7
- */
8
- import React from 'react'
9
- import { StyleSheet, View } from 'react-native'
10
- import type { DottedLineProps } from '.'
11
- export default (props: DottedLineProps) => {
12
- const {
13
- vertical = false,
14
- dottedColor,
15
- dottedCount = 200,
16
- ...rest
17
- } = props
18
- const arrs = Array.from({ length: dottedCount }, (k, v) => v)
19
- return (
20
- <View style={{ ...styles.container, flexDirection: vertical ? 'column' : 'row', ...rest.style as any }}>
21
- {
22
- arrs.map((item, index) => {
23
- return <View
24
- key={`dotted-${index}`}
25
- style={{
26
- ...(vertical ? styles.dotted_vertical : styles.dotted_horizontal),
27
- ...(dottedColor && { backgroundColor: dottedColor })
28
- }} />
29
- })
30
- }
31
- </View>
32
- )
33
-
34
- }
35
-
36
-
37
-
38
-
39
-
40
- const styles = StyleSheet.create({
41
- container: {
42
- display: 'flex',
43
- flexGrow: 1,
44
- overflow: 'hidden',
45
- flexDirection: 'row',
46
- flexWrap: 'nowrap',
47
- },
48
-
49
- dotted_horizontal: {
50
- flexGrow: 0,
51
- flexShrink: 0,
52
- width: 2,
53
- height: 1,
54
- marginRight: 2,
55
- backgroundColor: '#cccccc',
56
- },
57
- dotted_vertical: {
58
- flexGrow: 0,
59
- flexShrink: 0,
60
- width: 1,
61
- height: 2,
62
- marginBottom: 2,
63
- backgroundColor: '#cccccc',
64
- }
65
-
66
- })
@@ -1,18 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-07-12 15:30:28
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-12 15:31:31
6
- * @FilePath: /@aks-dev/easyui/lib/DottedLine/index.ts
7
- */
8
- import React from 'react'
9
- import { ViewProps } from 'react-native'
10
-
11
- export type DottedLineProps = {
12
- vertical?: boolean,
13
- dottedColor?: string,
14
- dottedCount?: number
15
- } & ViewProps
16
-
17
-
18
- export declare const DottedLine: React.FC<DottedLineProps>