Browse Source

1.提交按钮文字不居中问题

zhangmengjie 5 years ago
parent
commit
dadb6b5a4d
1 changed files with 18 additions and 13 deletions
  1. 18 13
      pages/components/PersonalInfoDialog.js

+ 18 - 13
pages/components/PersonalInfoDialog.js

@@ -161,7 +161,7 @@ export default class PersonalInfoDialog extends Component<Props> {
                   style={{
                     flex: 1,
                     textAlignVertical: "center",
-                    fontSize: 25,
+                    fontSize: 16,
                     color: "black"
                   }}
                 >
@@ -184,7 +184,7 @@ export default class PersonalInfoDialog extends Component<Props> {
                     borderColor: "black",
                     borderWidth: 0,
                     marginLeft: 5,
-                    fontSize: 20
+                    fontSize: 16
                   }}
                   onChangeText={text =>
                     this.setState({
@@ -202,15 +202,16 @@ export default class PersonalInfoDialog extends Component<Props> {
               >
                 <View
                   style={{
-                    flex: 4
+                    flex: 5
                   }}
                 />
                 <View
                   style={{
                     flex: 2,
-
                     height: "100%",
-                    borderRadius: 30
+                    borderRadius: 30,
+                    backgroundColor: this.state.touchcolor,
+                    alignItems: "center"
                   }}
                 >
                   <TouchableOpacity
@@ -223,12 +224,13 @@ export default class PersonalInfoDialog extends Component<Props> {
                   >
                     <Text
                       style={{
+                        height: "100%",
+                        width: "100%",
                         textAlignVertical: "center",
                         textAlign: "center",
-                        fontSize: 23,
+                        fontSize: 18,
                         borderRadius: 30,
-                        color: this.state.touchtextcolor,
-                        backgroundColor: this.state.touchcolor
+                        color: this.state.touchtextcolor
                       }}
                     >
                       确定
@@ -239,7 +241,10 @@ export default class PersonalInfoDialog extends Component<Props> {
                 <View
                   style={{
                     flex: 2,
-                    height: "100%"
+                    height: "100%",
+                    backgroundColor: this.state.touch_cancel_color,
+                    alignItems: "center",
+                    borderRadius: 30
                   }}
                 >
                   <TouchableOpacity
@@ -252,10 +257,10 @@ export default class PersonalInfoDialog extends Component<Props> {
                       style={{
                         textAlignVertical: "center",
                         textAlign: "center",
-                        borderRadius: 30,
-                        fontSize: 23,
-                        color: this.state.touch_cancel_textcolor,
-                        backgroundColor: this.state.touch_cancel_color
+                        height: "100%",
+                        width: "100%",
+                        fontSize: 18,
+                        color: this.state.touch_cancel_textcolor
                       }}
                     >
                       取消