@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)
|
}
|
}
|
}
|