Skip to content

Commit 3221716

Browse files
committed
1.减少启动屏延时\n2.Dialog自定义视图
1 parent 3fd05de commit 3221716

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/page/DialogModules/ViewTest.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React,{ Component } from 'react';
2+
import { connect } from 'react-redux';
3+
import { Alert,AlertIOS,Image, View, Text,StyleSheet,StatusBar,ActivityIndicator,ScrollView } from 'react-native';
4+
5+
class ViewTest extends Component {
6+
render(){
7+
return(
8+
<View style={{marginTop:10}}>
9+
<Text style={{color:'red'}}>
10+
{this.props.theme.id==='default'?this.props.theme.id:"变色了"}·
11+
{this.props.routh}:
12+
</Text>
13+
<Text style={this.props.theme.styles.navFont} >
14+
知止而后有定,定而后能静,静而后能安,安而后能虑,虑而后能得。物有本末,事有终始。知所先后,则近道矣。
15+
</Text>
16+
{
17+
this.props.theme.id !== 'default' && <Button
18+
onClick={this.props.setDefaultTheme}
19+
title={"默认颜色"}
20+
bgColor='#16A085'
21+
/>
22+
}
23+
</View>
24+
);
25+
}
26+
}
27+
const mapStateToProps = state => {
28+
return{
29+
theme:state.theme
30+
};
31+
};
32+
const mapDispatchToProps = (dispatch, ownProps) => {
33+
return {
34+
setDefaultTheme:()=>dispatch({type:'DEFAULT_THEME'})
35+
}
36+
};
37+
export default connect(mapStateToProps,mapDispatchToProps)(ViewTest)

0 commit comments

Comments
 (0)