add loading indicator
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
||||
AtButton,
|
||||
AtList,
|
||||
AtListItem,
|
||||
AtActivityIndicator,
|
||||
AtToast,
|
||||
} from 'taro-ui';
|
||||
import clockIcon from '@/assets/icons/MainPage/clock.svg';
|
||||
import type CustomTabBar from '@/custom-tab-bar';
|
||||
@@ -183,10 +185,21 @@ export default class MainPage extends Component<{}, MainPageState> {
|
||||
const mainPage = pt.get().mainPage;
|
||||
const memberPage = pt.get().memberPage;
|
||||
if (this.state.rs.loading) {
|
||||
return <View>loading</View>;
|
||||
return (
|
||||
<AtActivityIndicator
|
||||
mode='center'
|
||||
content={pt.get().actIndicator.loading}
|
||||
></AtActivityIndicator>
|
||||
);
|
||||
}
|
||||
if (!this.state.rs.success) {
|
||||
return <View>Failed</View>;
|
||||
return (
|
||||
<AtToast
|
||||
isOpened
|
||||
text={pt.get().toast.error}
|
||||
icon='close-circle'
|
||||
></AtToast>
|
||||
);
|
||||
}
|
||||
const fixListRenderer = this.state.fixList.map((item) => item.render());
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user