您好,我是新手,我本人都会做出反应,所以我遇到此错误
这是我当前正在处理的项目的登录/注册页面。我正在运行8.0 Oreo的物理设备Samsung S7 edge上运行此页面
**App.js***
import React from 'react'
import{StyleSheet,Text,View}from 'react-native'
import RegForm from '.app/Components/RegForm'
export default class App extends React.Component{
render(){
return(
<View style={Styles.Container}>
<RegForm />
</View>
)
}
}
const styles=StyleSheet.Create({
container:{
flex:1 ,
justifyContent:'center',
backgroundColor:'#36485f' ,
paddingLeft:60 ,
paddingRight:60 ,
},
})
***RegForm***
import React from 'react'
import{StyleSheet,Text,View,TextInput,TouchableOpacity}from 'react-native'
export default class RegForm extends React.Component{
render(){
return(
<View style={Styles.RegForm}>
<Text style={styles.header}>Registration</Text>
<TextInput style={styles.TextInput} placeholder="Please Enter your Name" />
<TextInput style={styles.TextInput} placeholder="Please Enter your Email" />
<TextInput style={styles.TextInput} placeholder="Please Enter your Password"
secureTextEntry={true} />
<TextInput style={styles.TextInput} placeholder="Please Enter your Mobile No" />
<TextInput style={styles.TextInput} placeholder="Please Enter your CNIC" />
<TouchableOpacity style={styles.button}>
<Text style={styles.btntext}>Sign Up</Text>
</TouchableOpacity>
</View>
)
}
}
const styles=StyleSheet.Create({
RegForm:{
alignSelf:'strech' ,
},
header:{
fontSize:24 ,
color:'#fff',
paddingBottom:10 ,
marginBottom:40 ,
borderBottomColor:'#199187',
borderBottomWidth:'1',
},
TextInput:{
alignSelf:'strech',
height:40 ,
marginBottom:30 ,
color:'#fff' ,
borderBottomColor:'#f8f8f8',
borderBottomWidth:1 ,
},
button:{
alignSelf:'strech',
alignItem:'center',
padding:20 ,
backgroundColor:'#59cbbd',
marginTop:30 ,
},
btntext:{
color:'#fff',
fontWeight:'bold',
}
})
答案 0 :(得分:0)
尝试
case when >=5 then 'system down' else 'communication error'
而不是
import RegForm from './app/Components/RegForm'
希望有帮助。如有任何疑问,请还原。