本文主要是介绍鸿蒙Next-TextInput制作简易登录页面,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
@Entry
@Component
struct EventCase {@State username: string = ''@State password: string = ''build() {Row() {Column({ space: 30 }) {TextInput({ placeholder: '请输入用户名', text: $$this.username }).height(40)TextInput({ placeholder: '请输入密码', text: $$this.password }).height(40).type(InputType.Password)Button('登录').width('100%').onClick(() => {// console.log( this.username)})}.padding({left: 20,right: 20}).width('100%')}.height('100%')}
}
这里用到了TextInput的属性 实现密码框的设置
这篇关于鸿蒙Next-TextInput制作简易登录页面的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!