中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
TextInput按压态背景色如何修改
微信扫码分享
可以使用ArkUI多态样式,修改按压态背景色。
代码示例
@Entry @Component struct Index { @Styles pressedStyles() { .backgroundColor(Color.White) } build() { Row() { Column() { TextInput() .backgroundColor(Color.White) .stateStyles({ pressed: this.pressedStyles, }) } .width('100%') } .height('100%') } }
参考链接
多态样式
可以使用ArkUI多态样式,修改按压态背景色。
代码示例
参考链接
多态样式