rn-project
Version:
#### 项目介绍 类似一个脚手架的工具 此项目致力于构建一套基础,简单,可维护的 适配我司的react-native项目。可在此基础上搭建项目,封装了基础架构,基础组件,以及各种交互等;可快速进行项目搭建,开发。 # 涉及主要技术 - 1. 项目主要架构 * react native * react-navigation * redux
77 lines (67 loc) • 1.69 kB
JavaScript
import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import { SafeAreaView } from 'react-navigation';
import Items from '../components/items';
import BaseStyle from '../constants/Style';
export default class OptionScreen extends Component {
// static propTypes = {
// };
// static defaultProps = {
// };
constructor(props) {
super(props);
}
componentDidMount = () => {};
componentWillUnMount = () => {};
render() {
const {
navigation: { navigate },
} = this.props;
return (
<SafeAreaView
style={[BaseStyle.flex, styles.homebg]}
forceInset={{ top: 'never' }}>
<View style={styles.container}>
{/* list */}
<Items
LeftText={'toast提示'}
RightIcon={'\ue615'}
onPress={() => {
navigate('ToastScreen');
}}
/>
<Items
LeftText={'Modal模态框'}
RightIcon={'\ue615'}
onPress={() => {
navigate('ModalScreen');
}}
/>
<Items
LeftText={'动作面板Action-sheet'}
RightIcon={'\ue615'}
onPress={() => {
navigate('ActionSheetScreen');
}}
/>
<Items
LeftText={'Loading加载'}
RightIcon={'\ue615'}
onPress={() => {
navigate('LoadingScreen');
}}
/>
</View>
</SafeAreaView>
);
}
}
const styles = StyleSheet.create({
homebg: {
backgroundColor: '#eee',
},
container: {
...BaseStyle.flex,
paddingTop: 20,
},
});