Authored by 张丽霞

个人中心列表为空时样式展示

'use strict';
import React, {Component} from 'react'
import {
StyleSheet,
View,
Text,
} from 'react-native';
export default class EmptyListTip extends Component {
static propTypes = {
text: React.PropTypes.string,
};
static defaultProps = {
text: '你还没有发布过帖子',
};
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>{this.props.text}</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
height: 200,
},
indicator: {
},
text: {
marginLeft: 10,
textAlign: 'center',
color:'#b0b0b0',
fontSize: 17,
},
});
... ...
... ... @@ -12,6 +12,7 @@ import SectionTabBar from '../section/SectionTabBar';
import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator';
import UserNavBar from './UserNavBar';
import TimerMixin from 'react-timer-mixin';
import EmptyListTip from './EmptyListTip';
const {
View,
... ... @@ -348,8 +349,7 @@ export default class User extends React.Component {
}}
renderFooter={() => {
if (endReached) {
return <LoadMoreIndicator
isVisible={true}
return <EmptyListTip
text={endReachedText}
/>
} else {
... ...