鸿蒙开发里面的响应式数据已经定义好了,但是界面上一直是未定义
@Entry
@Component
struct Login{
@State private text:String = "hello";
build(){
Column(){
Text("顶部")
.backgroundColor("blue")
.width("100%")
.height("100lpx")
.fontSize("36lpx")
.textAlign(TextAlign.Center)
Column(){
Row(){
TextInput({placeholder:'用户名/手机号/邮箱'})
.backgroundColor(Color.Transparent)
}
.border({width:{bottom:'3lpx'},color:'grey'})
.width("500lpx")
TextInput({placeholder:"密码"})
.type(InputType.Password)
.showPasswordIcon(false)
Text("text"+this.text)
Button("登录按钮").onClick(() =>{
})
Stack(){
Divider()
Text("其他登录方式")
.backgroundColor("#fafaf9")
.padding({left:'20lpx', right:'20lpx'})
}
}
.flexGrow(1)
.justifyContent(FlexAlign.SpaceEvenly)
Row(){
Column() {
Text("首页")
}
Text("品牌馆")
Text("分类")
Text("用户中心")
}
.backgroundColor("#Faa")
.width("100%")
.height("110lpx")
.justifyContent(FlexAlign.SpaceAround)
.border({width:{top:"3lpx"},color:{top:"blue"}})
}
.backgroundColor("#FAFAF9")
.width('720lpx')
.height('100%')
}
}