合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
HarmonyOS开发者版主1HarmonyOS TextInput控件showUnderline与Type方法冲突 (API12+)

TextInput组件的密码输入模式不支持下划线样式,所以不生效,showUnderline只支持InputType.Normal类型。结合outline可以实现下划线效果,示例代码如下:
@Entry
@Component
struct Index {
build() {
Row() {
Column() {
TextInput({ placeholder: 'input your password...' })
.width('95%')
.height(40)
.margin(20)
.type(InputType.Password)
.maxLength(9)
.showPasswordIcon(true)
.backgroundColor('#00000000')
.outline({
width: { bottom: 1 },
color: Color.Black,
})
}
.width('100%')
}
.height('100%')
}
}
我要提问题
HarmonyOS 是否支持通过网口转type-C转接,实现连接有线网路?(API12+)
HarmonyOS OH_AudioCapturer_OnInterruptEvent使用问题 (API12)
HarmonyOS TextInput组件显示异常问题,如何解决?(API12)
HarmonyOS TextInput输入type为密码,如何显示密码?(API12+)
HarmonyOS 控件文字与背景对比度存在问题(API12+)
HarmonyOS TextInput输入正则校验问题(API12+)
HarmonyOS TextArea 有没有类似于TextInput的showError属性 (API12+)
HarmonyOS TextReader 和Avplayer 控件冲突问题 (API12+)
合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
解决方案
精准高效的一站式服务支持,助力开发者商业成功