1import React from 'react'; 2import {StyleSheet, View} from 'react-native'; 3import rpx from '@/utils/rpx'; 4import { ActivityIndicator, useTheme } from 'react-native-paper'; 5import { fontWeightConst } from '@/constants/uiConst'; 6import ThemeText from './themeText'; 7 8 9interface ILoadingProps {} 10export default function Loading(props: ILoadingProps) { 11 const {colors} = useTheme(); 12 13 return ( 14 <View style={style.wrapper}> 15 <ActivityIndicator animating color={colors.text}></ActivityIndicator> 16 <ThemeText fontSize='title' style={style.text}>加载中...</ThemeText> 17 </View> 18 ); 19} 20 21const style = StyleSheet.create({ 22 wrapper: { 23 width: '100%', 24 flex: 1, 25 justifyContent: 'center', 26 alignItems: 'center', 27 }, 28 img: { 29 width: rpx(200), 30 height: rpx(200), 31 }, 32 text: { 33 fontWeight: fontWeightConst.bold, 34 marginTop: rpx(48), 35 }, 36}); 37