@aks-dev/easyui 1.0.79 → 1.0.82
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/Echarts/EchartsView.tsx +10 -6
- package/lib/Hud/AlertBottomView/AlertBottomView.tsx +227 -0
- package/lib/Hud/AlertBottomView/index.ts +42 -0
- package/lib/Hud/AlertView/AlertView.tsx +4 -4
- package/lib/Hud/AlertView/index.ts +5 -5
- package/lib/Hud/Hud.tsx +17 -6
- package/lib/Hud/PopoverView/PopoverView.tsx +60 -0
- package/lib/Hud/PopoverView/index.ts +38 -0
- package/lib/Hud/index.ts +4 -3
- package/lib/MenuView/MenuView.tsx +221 -0
- package/lib/MenuView/index.ts +26 -0
- package/lib/MutiPictureView/index.ts +4 -2
- package/lib/TextInputArea/TextInputArea.tsx +4 -3
- package/lib/TextInputArea/index.ts +9 -8
- package/package.json +1 -1
- package/screen/px2dp.ts +1 -1
- package/src/index.d.ts +3 -1
- package/src/index.ts +4 -6
- package/utils/index.ts +2 -3
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-05-05 14:52:53
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/easyui/lib/Echarts/EchartsView.tsx
|
|
5
|
+
* @LastEditTime: 2022-07-14 18:24:09
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/lib/Echarts/EchartsView.tsx
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
import { MeasureOnSuccessCallback, StyleSheet, View, ViewStyle } from 'react-native'
|
|
@@ -35,10 +35,14 @@ const EchartsView: React.FC<EchartsViewProps> = (props) => {
|
|
|
35
35
|
|
|
36
36
|
React.useEffect(() => {
|
|
37
37
|
containerRef.current?.measure((...args) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
if (args.length > 3) {
|
|
39
|
+
dispatch({
|
|
40
|
+
width: args[2],
|
|
41
|
+
height: args[3]
|
|
42
|
+
})
|
|
43
|
+
} else {
|
|
44
|
+
console.warn('[sg] EchartsView measure error')
|
|
45
|
+
}
|
|
42
46
|
})
|
|
43
47
|
|
|
44
48
|
}, [props.style])
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { View, Text, StyleSheet, Platform, StatusBar, TouchableOpacity, } from 'react-native'
|
|
3
|
+
import Modal from 'react-native-modal'
|
|
4
|
+
|
|
5
|
+
import { px2dp, deviceWidth } from '../../../screen/px2dp'
|
|
6
|
+
import { px2sp } from '../../../screen/px2sp'
|
|
7
|
+
|
|
8
|
+
import { AlertBottomViewOptions, AlertBottomViewCurrent } from '.'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type State = {
|
|
13
|
+
visible: boolean;
|
|
14
|
+
|
|
15
|
+
} & Omit<AlertBottomViewOptions, 'cancel' | 'confirm'>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export default React.forwardRef<AlertBottomViewCurrent, {}>((_, ref) => {
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const defaultState: Partial<State> = {
|
|
25
|
+
visible: false,
|
|
26
|
+
cancelText: '取消',
|
|
27
|
+
confirmText: '确定',
|
|
28
|
+
}
|
|
29
|
+
const [state, setState] = React.useState<Partial<State>>(defaultState)
|
|
30
|
+
const cancelCallbackRef = React.useRef<Function>();
|
|
31
|
+
const confirmCallbackRef = React.useRef<Function>();
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
React.useImperativeHandle<unknown, AlertBottomViewCurrent>(ref, () => ({
|
|
36
|
+
show: async (options: Partial<AlertBottomViewOptions>) => {
|
|
37
|
+
|
|
38
|
+
setState(Object.assign({}, defaultState, { visible: true }, options))
|
|
39
|
+
cancelCallbackRef.current = options.cancel;
|
|
40
|
+
confirmCallbackRef.current = options.confirm;
|
|
41
|
+
|
|
42
|
+
},
|
|
43
|
+
hide
|
|
44
|
+
}), [])
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
const hide = async () => {
|
|
48
|
+
setState(defaultState)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
if (Platform.OS == 'android') {
|
|
54
|
+
if (state.visible) {
|
|
55
|
+
StatusBar.setBackgroundColor('black')
|
|
56
|
+
StatusBar.setBarStyle('light-content')
|
|
57
|
+
} else {
|
|
58
|
+
StatusBar.setBackgroundColor('transparent')
|
|
59
|
+
StatusBar.setBarStyle('dark-content')
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}, [state.visible])
|
|
64
|
+
return (
|
|
65
|
+
<Modal
|
|
66
|
+
hideModalContentWhileAnimating={true}//通过隐藏模态内容直到动画完成来增强性能
|
|
67
|
+
useNativeDriver={true}//定义动画是否应使用本机驱动程序
|
|
68
|
+
animationIn='slideInUp'
|
|
69
|
+
animationOut='slideOutDown'
|
|
70
|
+
onBackButtonPress={() => {
|
|
71
|
+
//按下Android后退按钮时调用
|
|
72
|
+
hide()
|
|
73
|
+
}}
|
|
74
|
+
onBackdropPress={() => {
|
|
75
|
+
//按下背景时调用
|
|
76
|
+
hide()
|
|
77
|
+
}}
|
|
78
|
+
isVisible={state.visible}
|
|
79
|
+
style={{ margin: 0 }}
|
|
80
|
+
>
|
|
81
|
+
<View style={styles.container}>
|
|
82
|
+
<View style={[styles.wrapper, state.wrapperStyle]}>
|
|
83
|
+
{state.title && <Text style={styles.titleText}>{state.title}</Text>}
|
|
84
|
+
<View style={[state.contentContainerStyle]}>
|
|
85
|
+
{(() => {
|
|
86
|
+
if (typeof state.content == 'string') return <Text style={styles.contentText}>{state.content}</Text>
|
|
87
|
+
if (React.isValidElement(state.content)) return state.content;
|
|
88
|
+
return <View />
|
|
89
|
+
})()}
|
|
90
|
+
</View>
|
|
91
|
+
{
|
|
92
|
+
(state.cancelText || state.confirmText) &&
|
|
93
|
+
<View style={styles.action}>
|
|
94
|
+
{state.cancelText &&
|
|
95
|
+
<TouchableOpacity
|
|
96
|
+
style={[styles.cancel, { marginRight: state.confirmText ? px2dp(15) : 0 }, state.cancelContainerStyle]}
|
|
97
|
+
activeOpacity={0.8}
|
|
98
|
+
onPress={() => {
|
|
99
|
+
hide()
|
|
100
|
+
cancelCallbackRef.current && cancelCallbackRef.current()
|
|
101
|
+
cancelCallbackRef.current = undefined;
|
|
102
|
+
|
|
103
|
+
}}>
|
|
104
|
+
<Text style={[styles.cancelText, state.cancelTextStyle]}>{state.cancelText}</Text>
|
|
105
|
+
</TouchableOpacity>
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
{state.confirmText &&
|
|
109
|
+
<TouchableOpacity
|
|
110
|
+
style={[styles.confirm, { marginLeft: state.cancelText ? px2dp(15) : 0 }, state.confirmContainerStyle]}
|
|
111
|
+
activeOpacity={0.8}
|
|
112
|
+
onPress={() => {
|
|
113
|
+
hide()
|
|
114
|
+
confirmCallbackRef.current && confirmCallbackRef.current()
|
|
115
|
+
confirmCallbackRef.current = undefined;
|
|
116
|
+
}}>
|
|
117
|
+
<Text style={[styles.confirmText, state.confirmTextStyle]}>{state.confirmText}</Text>
|
|
118
|
+
</TouchableOpacity>
|
|
119
|
+
}
|
|
120
|
+
</View>
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
</View>
|
|
124
|
+
|
|
125
|
+
</View>
|
|
126
|
+
</Modal>
|
|
127
|
+
)
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
export const alertBottomViewRef = React.createRef<AlertBottomViewCurrent>();
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
export const showAlertBottomModal = (props: Partial<AlertBottomViewOptions>) => {
|
|
137
|
+
alertBottomViewRef.current?.show(props)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
// const sleep = (msec?: number) => {
|
|
143
|
+
// return new Promise(resolve => {
|
|
144
|
+
// setTimeout(resolve, msec || 350);
|
|
145
|
+
// });
|
|
146
|
+
// }
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
const styles = StyleSheet.create({
|
|
151
|
+
container: {
|
|
152
|
+
display: 'flex',
|
|
153
|
+
flexGrow: 1,
|
|
154
|
+
justifyContent: 'flex-end',
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
wrapper: {
|
|
160
|
+
flexGrow: 0,
|
|
161
|
+
flexShrink: 0,
|
|
162
|
+
width: '100%',
|
|
163
|
+
backgroundColor: 'white',
|
|
164
|
+
overflow: 'hidden',
|
|
165
|
+
borderTopLeftRadius: px2dp(10),
|
|
166
|
+
borderTopRightRadius: px2dp(10),
|
|
167
|
+
display: 'flex',
|
|
168
|
+
padding: px2dp(15),
|
|
169
|
+
},
|
|
170
|
+
titleText: {
|
|
171
|
+
maxWidth: deviceWidth - px2dp(30),
|
|
172
|
+
fontSize: px2sp(18),
|
|
173
|
+
marginBottom: px2dp(20),
|
|
174
|
+
// backgroundColor: 'red',
|
|
175
|
+
textAlign: 'center',
|
|
176
|
+
fontWeight: 'bold',
|
|
177
|
+
color: '#1A1A1A'
|
|
178
|
+
},
|
|
179
|
+
contentText: {
|
|
180
|
+
maxWidth: deviceWidth - px2dp(30),
|
|
181
|
+
marginBottom: px2dp(20),
|
|
182
|
+
minHeight: px2dp(40),
|
|
183
|
+
flexGrow: 0,
|
|
184
|
+
flexShrink: 1,
|
|
185
|
+
width: undefined,
|
|
186
|
+
fontSize: px2sp(15),
|
|
187
|
+
// backgroundColor: 'red',
|
|
188
|
+
color: '#1A1A1A',
|
|
189
|
+
textAlign: 'center'
|
|
190
|
+
},
|
|
191
|
+
action: {
|
|
192
|
+
display: 'flex',
|
|
193
|
+
flexDirection: 'row',
|
|
194
|
+
justifyContent: 'space-between',
|
|
195
|
+
alignItems: 'center',
|
|
196
|
+
// backgroundColor:"red"
|
|
197
|
+
},
|
|
198
|
+
cancel: {
|
|
199
|
+
width: '40%',
|
|
200
|
+
height: px2dp(44),
|
|
201
|
+
display: 'flex',
|
|
202
|
+
justifyContent: 'center',
|
|
203
|
+
alignItems: 'center',
|
|
204
|
+
borderRadius: px2dp(10),
|
|
205
|
+
borderWidth: px2dp(1),
|
|
206
|
+
borderColor: '#A3A9CC'
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
confirm: {
|
|
210
|
+
width: '40%',
|
|
211
|
+
height: px2dp(44),
|
|
212
|
+
display: 'flex',
|
|
213
|
+
justifyContent: 'center',
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
backgroundColor: '#2763FF',
|
|
216
|
+
borderRadius: px2dp(10)
|
|
217
|
+
},
|
|
218
|
+
cancelText: {
|
|
219
|
+
fontSize: px2sp(15),
|
|
220
|
+
color: '#A3A9CC',
|
|
221
|
+
|
|
222
|
+
},
|
|
223
|
+
confirmText: {
|
|
224
|
+
fontSize: px2sp(15),
|
|
225
|
+
color: 'white'
|
|
226
|
+
},
|
|
227
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: shiguo
|
|
3
|
+
* @Date: 2022-04-22 17:30:32
|
|
4
|
+
* @LastEditors: shiguo
|
|
5
|
+
* @LastEditTime: 2022-07-12 19:39:48
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/lib/Hud/AlertBottomView/index.ts
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import { StyleProp, ViewStyle, TextStyle } from 'react-native'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export declare type AlertBottomViewOptions = {
|
|
15
|
+
title: string;
|
|
16
|
+
wrapperStyle: StyleProp<ViewStyle>;
|
|
17
|
+
content: string | React.ReactElement;
|
|
18
|
+
contentContainerStyle:StyleProp<ViewStyle>;
|
|
19
|
+
cancelText: string;
|
|
20
|
+
cancelContainerStyle: StyleProp<ViewStyle>;
|
|
21
|
+
cancelTextStyle: StyleProp<TextStyle>;
|
|
22
|
+
cancel: () => void;
|
|
23
|
+
confirmText: string;
|
|
24
|
+
confirmContainerStyle: StyleProp<ViewStyle>;
|
|
25
|
+
confirmTextStyle: StyleProp<TextStyle>;
|
|
26
|
+
confirm: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export declare const showAlertBottomModal: (props: Partial<AlertBottomViewOptions>) => void;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export declare type AlertBottomViewCurrent = {
|
|
35
|
+
show: (options: Partial<AlertBottomViewOptions>) => void;
|
|
36
|
+
hide: () => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export declare const AlertBottomView: React.ForwardRefExoticComponent<React.PropsWithoutRef<{}> & React.RefAttributes<AlertBottomViewCurrent>>;
|
|
41
|
+
|
|
42
|
+
export declare const AlertBottomViewRef: React.RefObject<AlertBottomViewCurrent>
|
|
@@ -5,14 +5,14 @@ import { View, Text, StyleSheet, Platform, Modal, StatusBar, TouchableOpacity, A
|
|
|
5
5
|
import { px2dp, deviceWidth } from '../../../screen/px2dp'
|
|
6
6
|
import { px2sp } from '../../../screen/px2sp'
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { AlertViewOptions, AlertViewCurrent } from '.'
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
type State = {
|
|
13
13
|
visible: boolean;
|
|
14
14
|
|
|
15
|
-
} & Omit<
|
|
15
|
+
} & Omit<AlertViewOptions, 'cancel' | 'confirm'>
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -33,7 +33,7 @@ export default React.forwardRef<AlertViewCurrent, {}>((_, ref) => {
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
React.useImperativeHandle<unknown, AlertViewCurrent>(ref, () => ({
|
|
36
|
-
show: async (options: Partial<
|
|
36
|
+
show: async (options: Partial<AlertViewOptions>) => {
|
|
37
37
|
|
|
38
38
|
setState(Object.assign({}, defaultState, { visible: true }, options))
|
|
39
39
|
cancelCallbackRef.current = options.cancel;
|
|
@@ -138,7 +138,7 @@ export const alertViewRef = React.createRef<AlertViewCurrent>();
|
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
export const showAlertModal = (props: Partial<
|
|
141
|
+
export const showAlertModal = (props: Partial<AlertViewOptions>) => {
|
|
142
142
|
alertViewRef.current?.show(props)
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-22 17:30:32
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/easyui/lib/
|
|
5
|
+
* @LastEditTime: 2022-07-12 19:06:29
|
|
6
|
+
* @FilePath: /cmwy-device-app/node_modules/@aks-dev/easyui/lib/Hud/AlertView/index.ts
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ import * as React from 'react'
|
|
|
11
11
|
import { StyleProp, ViewStyle, TextStyle } from 'react-native'
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
export declare type
|
|
14
|
+
export declare type AlertViewOptions = {
|
|
15
15
|
title: string;
|
|
16
16
|
content: string | React.ReactElement;
|
|
17
17
|
wrapperStyle: StyleProp<ViewStyle>;
|
|
@@ -26,12 +26,12 @@ export declare type Options = {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
export declare const showAlertModal: (props: Partial<
|
|
29
|
+
export declare const showAlertModal: (props: Partial<AlertViewOptions>) => void;
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
export declare type AlertViewCurrent = {
|
|
34
|
-
show: (options: Partial<
|
|
34
|
+
show: (options: Partial<AlertViewOptions>) => void;
|
|
35
35
|
hide: () => void;
|
|
36
36
|
}
|
|
37
37
|
|
package/lib/Hud/Hud.tsx
CHANGED
|
@@ -2,23 +2,30 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-24 14:10:04
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/easyui/lib/Hud/Hud.tsx
|
|
5
|
+
* @LastEditTime: 2022-07-15 09:58:50
|
|
6
|
+
* @FilePath: /cmwy-device-app/node_modules/@aks-dev/easyui/lib/Hud/Hud.tsx
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
// import { StyleSheet } from 'react-native'
|
|
10
10
|
import {
|
|
11
11
|
alertViewRef, default as AlertView, showAlertModal
|
|
12
12
|
} from './AlertView/AlertView'
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
alertBottomViewRef, default as AlertBottomView, showAlertBottomModal
|
|
16
|
+
} from './AlertBottomView/AlertBottomView'
|
|
17
|
+
|
|
13
18
|
import {
|
|
14
19
|
hideLoading, Loading, loadingRef, showLoading
|
|
15
20
|
} from './Loading/Loading'
|
|
21
|
+
|
|
22
|
+
|
|
16
23
|
import {
|
|
17
24
|
showToast, Toast, toastRef
|
|
18
25
|
} from './Toast/Toast'
|
|
19
26
|
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
import {showPopoverView,hidePopoverView,popoverViewRef,PopoverView} from './PopoverView/PopoverView'
|
|
22
29
|
|
|
23
30
|
|
|
24
31
|
|
|
@@ -34,8 +41,9 @@ export const Hud: React.FC<{}> = () => React.cloneElement(
|
|
|
34
41
|
[
|
|
35
42
|
<Loading key="hud-0" ref={loadingRef} />,
|
|
36
43
|
<Toast key="hud-1" ref={toastRef} />,
|
|
37
|
-
<AlertView key="hud-2" ref={alertViewRef}
|
|
38
|
-
|
|
44
|
+
<AlertView key="hud-2" ref={alertViewRef} />,
|
|
45
|
+
<AlertBottomView key="hud-3" ref={alertBottomViewRef} />,
|
|
46
|
+
<PopoverView key="hud-4" ref={popoverViewRef}/>,
|
|
39
47
|
]
|
|
40
48
|
)
|
|
41
49
|
|
|
@@ -44,5 +52,8 @@ export {
|
|
|
44
52
|
showAlertModal,
|
|
45
53
|
showToast,
|
|
46
54
|
showLoading,
|
|
47
|
-
hideLoading
|
|
55
|
+
hideLoading,
|
|
56
|
+
showAlertBottomModal,
|
|
57
|
+
showPopoverView,
|
|
58
|
+
hidePopoverView
|
|
48
59
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: shiguo
|
|
3
|
+
* @Date: 2022-04-24 14:27:02
|
|
4
|
+
* @LastEditors: shiguo
|
|
5
|
+
* @LastEditTime: 2022-07-15 10:08:14
|
|
6
|
+
* @FilePath: /cmwy-device-app/node_modules/@aks-dev/easyui/lib/Hud/PopoverView/PopoverView.tsx
|
|
7
|
+
*/
|
|
8
|
+
import React, { useImperativeHandle, useState } from 'react';
|
|
9
|
+
import { Dimensions, StyleSheet, TouchableOpacity } from 'react-native';
|
|
10
|
+
import type { PopoverViewCurrent, PopoverViewOptions } from '.';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export const PopoverView = React.forwardRef<PopoverViewCurrent, {}>((_, ref) => {
|
|
18
|
+
const [visible, setVisible] = useState<boolean>(false);
|
|
19
|
+
const [options, setOptions] = useState<Partial<PopoverViewOptions> | undefined>()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
useImperativeHandle<unknown, PopoverViewCurrent>(ref, () => ({
|
|
23
|
+
showPopoverView: (options: Partial<PopoverViewOptions>) => {
|
|
24
|
+
setVisible(true);
|
|
25
|
+
setOptions(options)
|
|
26
|
+
|
|
27
|
+
},
|
|
28
|
+
hidePopoverView: () => {
|
|
29
|
+
setVisible(false);
|
|
30
|
+
setOptions(undefined)
|
|
31
|
+
}
|
|
32
|
+
}), [visible])
|
|
33
|
+
|
|
34
|
+
if (!visible)
|
|
35
|
+
return null;
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<TouchableOpacity activeOpacity={1} style={[styles.container,options.style]} onPress={e=>{
|
|
39
|
+
setVisible(false);
|
|
40
|
+
setOptions(undefined)
|
|
41
|
+
// e.stopPropagation()
|
|
42
|
+
}}>
|
|
43
|
+
{React.isValidElement(options.content) && options.content}
|
|
44
|
+
</TouchableOpacity>
|
|
45
|
+
)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
export const popoverViewRef = React.createRef<PopoverViewCurrent>();
|
|
49
|
+
export const showPopoverView = (options: Partial<PopoverViewOptions>) => popoverViewRef.current?.showPopoverView(options)
|
|
50
|
+
export const hidePopoverView = () => popoverViewRef.current?.hidePopoverView()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
const styles = StyleSheet.create({
|
|
54
|
+
container: {
|
|
55
|
+
...StyleSheet.absoluteFillObject,
|
|
56
|
+
display: 'flex',
|
|
57
|
+
|
|
58
|
+
// backgroundColor:'red'
|
|
59
|
+
},
|
|
60
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* @Author: shiguo
|
|
4
|
+
* @Date: 2022-04-24 14:27:02
|
|
5
|
+
* @LastEditors: shiguo
|
|
6
|
+
* @LastEditTime: 2022-07-15 10:07:56
|
|
7
|
+
* @FilePath: /cmwy-device-app/node_modules/@aks-dev/easyui/lib/Hud/PopoverView/index.ts
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react'
|
|
10
|
+
|
|
11
|
+
import {StyleProp,ViewStyle} from 'react-native'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export type PopoverViewOptions = {
|
|
15
|
+
content: React.ReactNode;
|
|
16
|
+
style: StyleProp<ViewStyle>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare type PopoverViewCurrent = {
|
|
22
|
+
showPopoverView: (options:Partial<PopoverViewOptions>) => void;
|
|
23
|
+
hidePopoverView: () => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export declare const showPopoverView: (options:Partial<PopoverViewOptions>) => void;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export declare const hidePopoverView: () => void;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export declare const popoverViewRef: React.RefObject<PopoverViewCurrent>;
|
|
36
|
+
|
|
37
|
+
export declare const PopoverView: React.ForwardRefExoticComponent<React.PropsWithoutRef<PopoverViewOptions> & React.RefAttributes<PopoverViewCurrent>>
|
|
38
|
+
|
package/lib/Hud/index.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-24 14:14:42
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/easyui/lib/Hud/index.ts
|
|
5
|
+
* @LastEditTime: 2022-07-15 12:40:12
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/lib/Hud/index.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
|
|
@@ -13,6 +13,7 @@ import * as React from 'react'
|
|
|
13
13
|
export * from './AlertView'
|
|
14
14
|
export * from './Loading'
|
|
15
15
|
export * from './Toast'
|
|
16
|
-
|
|
16
|
+
export * from './AlertBottomView'
|
|
17
|
+
export * from './PopoverView'
|
|
17
18
|
|
|
18
19
|
export declare const Hud: React.FC<{}>
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Image, LayoutRectangle, MeasureInWindowOnSuccessCallback, ScrollView, StatusBar, Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import type { MenuProps } from '.';
|
|
4
|
+
import { deviceHeight, deviceWidth } from '../../screen/px2dp';
|
|
5
|
+
import { hidePopoverView, showPopoverView } from '../Hud/Hud';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
type State = {
|
|
9
|
+
target?: LayoutRectangle;
|
|
10
|
+
arrow?: Partial<{
|
|
11
|
+
left: number | string;
|
|
12
|
+
right: number | string;
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
type Reducer = (prevState: State, action: Partial<State>) => State
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export default (props: MenuProps) => {
|
|
24
|
+
|
|
25
|
+
const [state, dispatch] = React.useReducer<Reducer>((prevState, action) => Object.assign({}, prevState, action), {})
|
|
26
|
+
|
|
27
|
+
const containerRef = React.useRef<{ measureInWindow: (callback: MeasureInWindowOnSuccessCallback) => void }>()
|
|
28
|
+
const _container = React.useRef<{
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
height: number;
|
|
32
|
+
width: number;
|
|
33
|
+
}>({ x: 0, y: 0, width: 0, height: 0 })
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
containerRef.current?.measureInWindow((...args) => {
|
|
38
|
+
// console.log('containerRef', args)
|
|
39
|
+
if (args.length == 4) {
|
|
40
|
+
_container.current = {
|
|
41
|
+
x: args[0],
|
|
42
|
+
y: args[1],
|
|
43
|
+
width: args[2],
|
|
44
|
+
height: args[3],
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
const getLayoutInfos: () => {
|
|
53
|
+
alignVertical: 'bottom' | 'top';
|
|
54
|
+
alignHorizontal: 'left' | 'right';
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
target_width: number;
|
|
60
|
+
target_height: number;
|
|
61
|
+
}
|
|
62
|
+
= () => {
|
|
63
|
+
let alignVertical: 'bottom' | 'top' = 'bottom'
|
|
64
|
+
let alignHorizontal: 'left' | 'right' = 'left'
|
|
65
|
+
let width = _container.current.width
|
|
66
|
+
let height = _container.current.height
|
|
67
|
+
let x = _container.current.x
|
|
68
|
+
let y = (StatusBar.currentHeight || 0) + _container.current.y + height
|
|
69
|
+
if (x > Math.abs(deviceWidth - width - x)) {
|
|
70
|
+
alignHorizontal = 'right'
|
|
71
|
+
}
|
|
72
|
+
if (y > deviceHeight * .5) {
|
|
73
|
+
alignVertical = 'top'
|
|
74
|
+
}
|
|
75
|
+
const target_width = state.target?.width || 0
|
|
76
|
+
const target_height = state.target?.height || 0
|
|
77
|
+
return {
|
|
78
|
+
alignVertical,
|
|
79
|
+
alignHorizontal,
|
|
80
|
+
width,
|
|
81
|
+
height,
|
|
82
|
+
x,
|
|
83
|
+
y,
|
|
84
|
+
target_width,
|
|
85
|
+
target_height,
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
const reLayout = (): Partial<{
|
|
91
|
+
left: number;
|
|
92
|
+
right: number;
|
|
93
|
+
top: number;
|
|
94
|
+
botttom: number;
|
|
95
|
+
}> => {
|
|
96
|
+
let {
|
|
97
|
+
alignVertical,
|
|
98
|
+
alignHorizontal,
|
|
99
|
+
width,
|
|
100
|
+
height,
|
|
101
|
+
x,
|
|
102
|
+
y,
|
|
103
|
+
target_width,
|
|
104
|
+
target_height,
|
|
105
|
+
} = getLayoutInfos()
|
|
106
|
+
|
|
107
|
+
const toAlignHorizontal = () => {
|
|
108
|
+
if (alignHorizontal == 'left') {
|
|
109
|
+
if (target_width + x > deviceWidth) {
|
|
110
|
+
return {
|
|
111
|
+
left: Math.abs(deviceWidth - target_width) * .7,
|
|
112
|
+
top: y,
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
left: Math.max(x, 15),
|
|
117
|
+
top: y,
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
let _x = deviceWidth - x - width
|
|
121
|
+
if (target_width + _x > deviceWidth) {
|
|
122
|
+
return {
|
|
123
|
+
right: Math.abs(deviceWidth - target_width) * .7,
|
|
124
|
+
top: y
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
right: Math.max(_x, 15),
|
|
129
|
+
top: y
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (alignVertical == 'bottom') {
|
|
134
|
+
y = y + 10
|
|
135
|
+
return toAlignHorizontal()
|
|
136
|
+
} else {
|
|
137
|
+
y = (StatusBar.currentHeight || 0) + _container.current.y - target_height - 10
|
|
138
|
+
return toAlignHorizontal()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
const show = () => {
|
|
144
|
+
// console.log('_container', _container.current, StatusBar.currentHeight)
|
|
145
|
+
showPopoverView({
|
|
146
|
+
content: (
|
|
147
|
+
<TouchableOpacity
|
|
148
|
+
activeOpacity={1}
|
|
149
|
+
style={{
|
|
150
|
+
position: 'absolute',
|
|
151
|
+
minWidth: deviceWidth * 0.36,
|
|
152
|
+
maxWidth: deviceWidth * 0.8,
|
|
153
|
+
minHeight: 36 + 20,
|
|
154
|
+
maxHeight: 36 * 5 + 20,
|
|
155
|
+
borderRadius: 6, backgroundColor: '#000000ee',
|
|
156
|
+
// overflow: 'hidden' ,
|
|
157
|
+
padding: 10,
|
|
158
|
+
...reLayout()
|
|
159
|
+
}}
|
|
160
|
+
// onLayout={e=>{
|
|
161
|
+
// console.log('onLayout TouchableOpacity', e.nativeEvent.layout)
|
|
162
|
+
// }}
|
|
163
|
+
>
|
|
164
|
+
|
|
165
|
+
<View style={{
|
|
166
|
+
width: 12, height: 12,
|
|
167
|
+
backgroundColor: '#000000ee', position: 'absolute', zIndex: 1,
|
|
168
|
+
transform: [{ rotateZ: '45deg' }],
|
|
169
|
+
...(() => {
|
|
170
|
+
const {
|
|
171
|
+
alignVertical,
|
|
172
|
+
alignHorizontal,
|
|
173
|
+
} = getLayoutInfos()
|
|
174
|
+
if (alignVertical == 'bottom' && alignHorizontal == 'left') return { left: '20%', top: -5 }
|
|
175
|
+
if (alignVertical == 'bottom' && alignHorizontal == 'right') return { right: '20%', top: -5 }
|
|
176
|
+
if (alignVertical == 'top' && alignHorizontal == 'left') return { left: '20%', bottom: -5 }
|
|
177
|
+
if (alignVertical == 'top' && alignHorizontal == 'right') return { right: '20%', bottom: -5 }
|
|
178
|
+
return {}
|
|
179
|
+
})()
|
|
180
|
+
}} />
|
|
181
|
+
|
|
182
|
+
<ScrollView onLayout={e => {
|
|
183
|
+
// console.log('onLayout', e.nativeEvent.layout)
|
|
184
|
+
let target: LayoutRectangle = e.nativeEvent.layout
|
|
185
|
+
dispatch({ target })
|
|
186
|
+
}}
|
|
187
|
+
style={{}}
|
|
188
|
+
>
|
|
189
|
+
{props.data?.map((i, idx) => {
|
|
190
|
+
return (
|
|
191
|
+
<TouchableOpacity
|
|
192
|
+
activeOpacity={.7}
|
|
193
|
+
key={`sg-memnu-${idx}`}
|
|
194
|
+
style={{
|
|
195
|
+
height: 36, display: 'flex', flexDirection: 'row', alignItems: 'center'
|
|
196
|
+
// ,backgroundColor:utils.randomcolor()
|
|
197
|
+
}}
|
|
198
|
+
onPress={e => {
|
|
199
|
+
props.onItemClick && props.onItemClick(idx, i.extra)
|
|
200
|
+
hidePopoverView()
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
{i.icon &&
|
|
204
|
+
<Image style={{ width: 18, height: 18, marginRight: 4 }} source={i.icon} />
|
|
205
|
+
}
|
|
206
|
+
<Text style={{ flexShrink: 1, fontSize: 14, color: 'white' }}>{i.text}</Text>
|
|
207
|
+
</TouchableOpacity>
|
|
208
|
+
)
|
|
209
|
+
})}
|
|
210
|
+
</ScrollView>
|
|
211
|
+
</TouchableOpacity>
|
|
212
|
+
)
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return (
|
|
217
|
+
<TouchableOpacity ref={containerRef as any} onPress={e => show()} >
|
|
218
|
+
{props.children}
|
|
219
|
+
</TouchableOpacity>
|
|
220
|
+
)
|
|
221
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: shiguo
|
|
3
|
+
* @Date: 2022-07-14 18:09:02
|
|
4
|
+
* @LastEditors: shiguo
|
|
5
|
+
* @LastEditTime: 2022-07-15 12:39:20
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/lib/MenuView/index.ts
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { ImageSourcePropType } from 'react-native';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export type MenuItem = {
|
|
15
|
+
text: string;
|
|
16
|
+
icon?: ImageSourcePropType;
|
|
17
|
+
extra?:any
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type MenuProps = {
|
|
21
|
+
data?: MenuItem[];
|
|
22
|
+
onItemClick?: (index: number,extra?:any) => void;
|
|
23
|
+
} & Readonly<{ children?: React.ReactNode | undefined }>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export declare const MenuView: React.FC<MenuProps>;
|
|
@@ -3,8 +3,8 @@ import { TextStyle } from 'react-native';
|
|
|
3
3
|
* @Author: shiguo
|
|
4
4
|
* @Date: 2022-04-24 17:38:32
|
|
5
5
|
* @LastEditors: shiguo
|
|
6
|
-
* @LastEditTime: 2022-
|
|
7
|
-
* @FilePath: /@aks/easyui/lib/MutiPictureView/index.ts
|
|
6
|
+
* @LastEditTime: 2022-07-14 15:14:53
|
|
7
|
+
* @FilePath: /@aks-dev/easyui/lib/MutiPictureView/index.ts
|
|
8
8
|
*/
|
|
9
9
|
import { StyleProp, ViewStyle, ImageStyle, ImageSourcePropType } from 'react-native'
|
|
10
10
|
|
|
@@ -31,7 +31,9 @@ export declare type MutiPictureViewProps = {
|
|
|
31
31
|
/**@deprecated title 标题 ,已弃用*/
|
|
32
32
|
title?: string;
|
|
33
33
|
bind: BindProps;
|
|
34
|
+
/**default maxCount is 6 */
|
|
34
35
|
maxCount?: number;
|
|
36
|
+
/**default type is showImagePicker */
|
|
35
37
|
type?: 'showImagePicker' | 'openCamera';
|
|
36
38
|
style?:StyleProp<ViewStyle>;
|
|
37
39
|
addIcon?: ImageSourcePropType;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-24 13:56:47
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/easyui/lib/TextInputArea/TextInputArea.tsx
|
|
5
|
+
* @LastEditTime: 2022-07-14 11:56:11
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/lib/TextInputArea/TextInputArea.tsx
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react'
|
|
9
9
|
import { View, Text, TextInput, StyleSheet } from 'react-native'
|
|
@@ -33,7 +33,7 @@ export default React.forwardRef<TextInputAreaCurrent, Partial<TextInputAreaProps
|
|
|
33
33
|
|
|
34
34
|
<TextInput
|
|
35
35
|
{...rest}
|
|
36
|
-
style={styles.textInput}
|
|
36
|
+
style={[styles.textInput,rest.textInputStyle]}
|
|
37
37
|
value={value}
|
|
38
38
|
onChangeText={txt => {
|
|
39
39
|
setValue(txt);
|
|
@@ -70,6 +70,7 @@ const styles = StyleSheet.create({
|
|
|
70
70
|
flex: 1,
|
|
71
71
|
margin: px2dp(15),
|
|
72
72
|
marginBottom: px2dp(8),
|
|
73
|
+
fontSize:px2sp(14)
|
|
73
74
|
// backgroundColor: 'red'
|
|
74
75
|
},
|
|
75
76
|
corner: {
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-24 13:59:32
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/
|
|
5
|
+
* @LastEditTime: 2022-07-14 11:56:00
|
|
6
|
+
* @FilePath: /@aks-dev/easyui/lib/TextInputArea/index.ts
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
|
-
import { ViewStyle, StyleProp, TextInputProps } from 'react-native'
|
|
9
|
+
import { ViewStyle, StyleProp, TextInputProps, TextStyle } from 'react-native'
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
export type TextInputAreaProps = {
|
|
13
|
-
placeholder: string
|
|
14
|
-
maxLength: number
|
|
15
|
-
style: StyleProp<ViewStyle
|
|
13
|
+
placeholder: string;
|
|
14
|
+
maxLength: number;
|
|
15
|
+
style: StyleProp<ViewStyle>;
|
|
16
|
+
textInputStyle: StyleProp<TextStyle>;
|
|
16
17
|
/**设置默认值 */
|
|
17
|
-
defaultValue: string
|
|
18
|
+
defaultValue: string;
|
|
18
19
|
/*监听content的变化*/
|
|
19
|
-
on: (content: string) => void
|
|
20
|
+
on: (content: string) => void;
|
|
20
21
|
} & TextInputProps
|
|
21
22
|
|
|
22
23
|
|
package/package.json
CHANGED
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-07-14 20:19:39
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/screen/px2dp.ts
|
|
7
7
|
*/
|
|
8
8
|
import { Dimensions, Platform, StatusBar } from 'react-native';
|
package/src/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-26 11:44:22
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-07-12
|
|
5
|
+
* @LastEditTime: 2022-07-15 12:36:37
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/src/index.d.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -42,6 +42,8 @@ export * from '../lib/RichText'
|
|
|
42
42
|
|
|
43
43
|
export * from '../lib/DottedLine'
|
|
44
44
|
|
|
45
|
+
export * from '../lib/MenuView'
|
|
46
|
+
|
|
45
47
|
/// 工具
|
|
46
48
|
import * as utils from '../utils'
|
|
47
49
|
export {
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @Author: shiguo
|
|
4
4
|
* @Date: 2022-04-13 12:47:34
|
|
5
5
|
* @LastEditors: shiguo
|
|
6
|
-
* @LastEditTime: 2022-07-12
|
|
6
|
+
* @LastEditTime: 2022-07-15 12:40:31
|
|
7
7
|
* @FilePath: /@aks-dev/easyui/src/index.ts
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -13,10 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
export * from '../lib/Badge/Badge'
|
|
16
|
-
// export type { BadgeProps } from '../lib/Badge'
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
export { Hud, showLoading, hideLoading, showToast, showAlertModal } from '../lib/Hud/Hud'
|
|
17
|
+
export { Hud, showLoading, hideLoading, showToast, showAlertModal, showAlertBottomModal, showPopoverView, hidePopoverView } from '../lib/Hud/Hud'
|
|
20
18
|
|
|
21
19
|
export * from '../lib/Modal/Modal'
|
|
22
20
|
|
|
@@ -29,11 +27,9 @@ export { RefreshState } from '../lib/RefreshList'
|
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
export { default as TableCell } from '../lib/TableCell/TableCell'
|
|
32
|
-
// export type { TableCellProps } from '../lib/TableCell'
|
|
33
30
|
|
|
34
31
|
|
|
35
32
|
export { default as TextInputArea } from '../lib/TextInputArea/TextInputArea'
|
|
36
|
-
// export type { TextInputAreaCurrent, TextInputAreaProps } from '../lib/TextInputArea'
|
|
37
33
|
|
|
38
34
|
|
|
39
35
|
export { default as WithLoadingContainer } from '../lib/WithLoadingContainer/WithLoadingContainer'
|
|
@@ -48,6 +44,8 @@ export { echarts } from '../lib/Echarts'
|
|
|
48
44
|
export { default as RichText } from '../lib/RichText/RichText'
|
|
49
45
|
export { default as DottedLine } from '../lib/DottedLine/DottedLine'
|
|
50
46
|
|
|
47
|
+
export { default as MenuView } from '../lib/MenuView/MenuView'
|
|
48
|
+
|
|
51
49
|
/// 全局适配
|
|
52
50
|
export * from '../screen/px2dp'
|
|
53
51
|
export * from '../screen/px2sp'
|
package/utils/index.ts
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-19 10:25:43
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-07-11
|
|
5
|
+
* @LastEditTime: 2022-07-13 11:27:24
|
|
6
6
|
* @FilePath: /@aks-dev/easyui/utils/index.ts
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import
|
|
10
|
-
import * as rn from 'react-native'
|
|
9
|
+
import * as rn from 'react-native';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* @description: 睡眠时间
|