@aks-dev/easyui 1.0.18 → 1.0.21
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.
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
export default React.forwardRef((props: RefreshListProps, ref: React.Ref<any>) => {
|
|
21
20
|
const {
|
|
22
21
|
mode = 'FlatList',
|
|
@@ -173,10 +172,15 @@ const ListFooterComponent = React.memo((props: RefreshListProps) => {
|
|
|
173
172
|
case RefreshState.EmptyData:
|
|
174
173
|
if (props.renderListEmptyComponent) return props.renderListEmptyComponent()
|
|
175
174
|
return (
|
|
176
|
-
<View style={{
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
<View style={{
|
|
176
|
+
width: '100%', height: '100%',
|
|
177
|
+
display: 'flex',
|
|
178
|
+
justifyContent: 'center', alignItems: 'center'
|
|
179
|
+
}}>
|
|
180
|
+
<TouchableOpacity style={{ minHeight: 44 }}
|
|
181
|
+
onPress={() => {
|
|
182
|
+
reload && reload()
|
|
183
|
+
}}>
|
|
180
184
|
<Text style={styles.text}>{RefreshText.EmptyData}</Text>
|
|
181
185
|
</TouchableOpacity>
|
|
182
186
|
</View>
|
package/lib/RefreshList/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: your name
|
|
3
3
|
* @Date: 2022-04-20 14:56:05
|
|
4
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditTime: 2022-05-16 15:50:31
|
|
5
5
|
* @LastEditors: shiguo
|
|
6
6
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
7
7
|
* @FilePath: /@aks/easyui/lib/RefreshList/index.ts
|
|
@@ -25,9 +25,9 @@ import { IPropsSwipeListView } from 'react-native-swipe-list-view/types'
|
|
|
25
25
|
|
|
26
26
|
type CommonProps = {
|
|
27
27
|
// mode: keyof easyui.Mode;
|
|
28
|
-
onHeaderRefresh:
|
|
28
|
+
onHeaderRefresh: (info: any) => void;
|
|
29
29
|
onFooterRefresh: (info: any) => void;
|
|
30
|
-
reload:
|
|
30
|
+
reload: () => void;
|
|
31
31
|
refreshState: RefreshState;
|
|
32
32
|
renderListEmptyComponent: () => React.ReactElement;
|
|
33
33
|
}
|
|
@@ -73,7 +73,7 @@ export const RefreshText = {
|
|
|
73
73
|
FooterRefreshing: '下拉可以加载更多',
|
|
74
74
|
Failure: '服务器正在出小差,点击重新加载',
|
|
75
75
|
NoMoreData: '已经全部加载完毕',
|
|
76
|
-
EmptyData: '
|
|
76
|
+
EmptyData: '没有数据',
|
|
77
77
|
Idle: '正在加载更多的数据..',
|
|
78
78
|
}
|
|
79
79
|
|
package/package.json
CHANGED
package/screen/px2dp.tsx
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: shiguo
|
|
3
|
+
* @Date: 2022-04-18 14:32:25
|
|
4
|
+
* @LastEditors: shiguo
|
|
5
|
+
* @LastEditTime: 2022-05-16 17:43:18
|
|
6
|
+
* @FilePath: /@aks/easyui/screen/px2dp.tsx
|
|
7
|
+
*/
|
|
1
8
|
import { Dimensions, StatusBar, Platform } from 'react-native';
|
|
2
9
|
|
|
3
10
|
|
|
@@ -31,7 +38,7 @@ export const isiPhoneX = isIos && (deviceHeight > 736)
|
|
|
31
38
|
|
|
32
39
|
export const statusBarHeight = (() => {
|
|
33
40
|
if (isAndroid) {
|
|
34
|
-
if ((StatusBar.currentHeight || 0) > 20) return
|
|
41
|
+
if ((StatusBar.currentHeight || 0) > 20) return 30
|
|
35
42
|
}
|
|
36
43
|
if (isiPhoneX) return 44
|
|
37
44
|
return 20
|