国际化 - 比特日记
国际化
string_cn.json
string_en.json
配置

切换
复制成功
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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%')
}
}

Copyright ©2010-2022 比特日记 All Rights Reserved.
Powered By 可尔物语
浙ICP备11005866号-12