国际化

string_cn.json

string_en.json

配置

切换

 1@Entry  2@Component  3struct Index {  4  5 build() {  6 Column() {  7 Text($r('app.string.title'))  8 .fontColor($r('app.color.bg_color'))  9 TextInput({ 10 placeholder: $r('app.string.notice_text') 11 }) 12 } 13 .width('100%') 14 .height('100%') 15 } 16}
@Entry @Component struct Index { build() { Column() { Text($r('app.string.title')) .fontColor($r('app.color.bg_color')) TextInput({ placeholder: $r('app.string.notice_text') }) } .width('100%') .height('100%') } }

系统颜色

 1@Entry  2@Component  3struct Index {  4  5 build() {  6 Column() {  7 Text($r('app.string.title'))  8 .fontColor($r('sys.color.warning'))  9 TextInput({ 10 placeholder: $r('app.string.notice_text') 11 }) 12 } 13 .width('100%') 14 .height('100%') 15 } 16}
@Entry @Component struct Index { build() { Column() { Text($r('app.string.title')) .fontColor($r('sys.color.warning')) TextInput({ placeholder: $r('app.string.notice_text') }) } .width('100%') .height('100%') } }

Powered By 可尔物语

浙ICP备11005866号-12