wwf
4 天以前 7f2343d38fa048f6ce179ea0ab2c1a04f41a213c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@Entry
@Component
export struct UserInfo {
  @State nickName: string = ''
  @State gender: string = ''
  @State age: string = ''
  @State preferJob: string = ''
  @State job: string = ''
  @State introduce: string = ''
 
  build() {
    Column() {
      Row() {
        Image($r('app.media.left_icon'))
          .width(20)
          .height(20)
        Text('个人信息')
          .fontSize(18)
          .fontWeight(700)
        Row()
      }
      .width('100%')
      .padding(10)
      .justifyContent(FlexAlign.SpaceBetween)
 
      Divider()
 
      Column({ space: 14 }) {
        Column() {
          Text(`昵称`)
            .fontSize(14)
            .fontColor('#666666')
            .width('100%')
          TextInput({ placeholder: '请输入', text: this.nickName })
            .placeholderFont({ size: 14 })
            .showUnderline(true)
            .margin({ top: -6 })
        }
 
        Column() {
          Text(`性别`)
            .fontSize(14)
            .fontColor('#666666')
            .width('100%')
          TextInput({ placeholder: '请输入', text: this.gender })
            .placeholderFont({ size: 14 })
            .showUnderline(true)
            .margin({ top: -6 })
        }
 
        Column() {
          Text(`年龄`)
            .fontSize(14)
            .fontColor('#666666')
            .width('100%')
          TextInput({ placeholder: '请输入', text: this.age })
            .placeholderFont({ size: 14 })
            .showUnderline(true)
            .margin({ top: -6 })
        }
 
        Column() {
          Text(`职业`)
            .fontSize(14)
            .fontColor('#666666')
            .width('100%')
          TextInput({ placeholder: '请输入', text: this.job })
            .placeholderFont({ size: 14 })
            .showUnderline(true)
            .margin({ top: -6 })
        }
 
        Column() {
          Text(`心仪职业`)
            .fontSize(14)
            .fontColor('#666666')
            .width('100%')
          TextInput({ placeholder: '请输入', text: this.preferJob })
            .placeholderFont({ size: 14 })
            .showUnderline(true)
            .margin({ top: -6 })
        }
 
        Column() {
          Text(`个人简介`)
            .fontColor('#666666')
            .fontSize(14)
            .width('100%')
          TextArea({ placeholder: '介绍一下你自己吧~', text: this.job })
            .placeholderFont({ size: 14 })
            .backgroundColor('#fff')
            .border({ width: 1, color: '#666666' })
            .borderRadius(5)
            .minLines(10)
            .maxLength(200)
            .showCounter(true)
            .margin({ top: 10 })
        }
 
        Button('保存')
          .fontSize(14)
          .height(36)
          .type(ButtonType.Normal)
          .borderRadius(6)
          .width('100%')
          .fontColor(Color.White)
          .backgroundColor('#1761f4')
 
      }
      .height('100%')
      .width('100%')
      .padding(16)
    }
  }
}