赞
踩
装饰器是用于装饰类、结构、方法以及变量,并赋予其特殊的含义。如:
build() { Column() { Scroll() { Column() { this.LoginButton() } } .width(Constants.MATCH_PARENT) .backgroundColor($r('app.color.app_background')) .padding(15) } @Builder LoginButton() { Button($r('app.string.login')) .width(Constants.MATCH_PARENT) .height(40) .borderRadius(20) .fontSize(16) .margin({ top: 50 }) .fontWeight(500) .enabled(true) .fontColor(Color.White) .backgroundColor($r('app.color.blue')) .onClick(() => { }) }
@Exte
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。