HarmonyOS 鸿蒙Next:[Compile Result] .stateStyles doesn't conform standard.
HarmonyOS 鸿蒙Next:[Compile Result] .stateStyles doesn’t conform standard.
<markdown _ngcontent-jql-c237="" class="markdownPreContainer">
@Styles normalStyles():void {
.backgroundColor("#0A59F7")
}
@Styles pressedStyle():void {
.backgroundColor("#000000")
}
Text(){
//xxx
}
.stateStyles({
normal: this.normalStyles,//IDE 会自动加上(), 太容易错了
pressed: this.pressedStyle,
})
<button style="position: absolute; padding: 4px 8px 0px; cursor: pointer; top: 4px; right: 8px; font-size: 14px;">复制</button>
</markdown>
1 回复