diff --git a/build-profile.json5 b/build-profile.json5 index c4e8cef12735e3a7929c1740117603c46528ebe4..85f1c1c997db581dbbbfac0ad4a16edbe453dbc7 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -6,7 +6,7 @@ "name": "default", "signingConfig": "default", "targetSdkVersion": "6.0.0(20)", - "compatibleSdkVersion": "6.0.0(20)", + "compatibleSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", "buildOption": { "strictMode": { diff --git a/entry/src/main/ets/pages/ComponentInternalStatus.ets b/entry/src/main/ets/pages/ComponentInternalStatus.ets index a0b65943a6f3009d2e926c3822d428e38b8e751d..801c593470c6b2be607d616d836c372b565e21e5 100644 --- a/entry/src/main/ets/pages/ComponentInternalStatus.ets +++ b/entry/src/main/ets/pages/ComponentInternalStatus.ets @@ -29,7 +29,7 @@ struct ComponentInternalStatus { Column() { Column() { Column({ space: 20 }) { - Text($r('app.string.counter')) + Text('计数器') .fontSize(22) .fontWeight(FontWeight.Bold) Row() { diff --git a/entry/src/main/ets/pages/MonitoringBatch.ets b/entry/src/main/ets/pages/MonitoringBatch.ets index aeff055b1de8aa00a656cb5f417b6572b0f6bbb2..7a3ec5f0fb76ff4e479fd695c021e052ba3c04f3 100644 --- a/entry/src/main/ets/pages/MonitoringBatch.ets +++ b/entry/src/main/ets/pages/MonitoringBatch.ets @@ -44,7 +44,7 @@ struct MonitoringBatch { .fontWeight(FontWeight.Bold) .fontColor('rgba(10, 89, 247, 1)') .textAlign(TextAlign.Center) - Text(`${this.index2}`) + Text(`${this.index1}`) .width('20%') .fontSize(24) .fontWeight(FontWeight.Bold) diff --git a/entry/src/main/ets/pages/ParameterInput.ets b/entry/src/main/ets/pages/ParameterInput.ets index a7541d86cd5d4aedd5b706794d7614dd1eadedc3..43514f8250825476f452f78b3923fa303cc40143 100644 --- a/entry/src/main/ets/pages/ParameterInput.ets +++ b/entry/src/main/ets/pages/ParameterInput.ets @@ -57,7 +57,7 @@ struct ParameterInput { Column() { Column() { Column({ space: 20 }) { - Text($r('app.string.counter')) + Text('计数器') .fontSize(22) .fontWeight(FontWeight.Bold) diff --git a/entry/src/main/ets/pages/StateCacheAfter.ets b/entry/src/main/ets/pages/StateCacheAfter.ets index a7e6c2e972d20d6132edae3336515ab61017108c..f86de1f918073d9399b46ef02d438c4d02b782ec 100644 --- a/entry/src/main/ets/pages/StateCacheAfter.ets +++ b/entry/src/main/ets/pages/StateCacheAfter.ets @@ -33,10 +33,10 @@ struct StateCacheAfter { Column() { Column({ space: 18 }) { Column() { - Text($r('app.string.apple')) + Text('苹果') .fontSize(22) .fontWeight(FontWeight.Bold) - Text($r('app.string.price', this.price.toString())) + Text('单价' + this.price) .fontSize(16) .fontColor('rgba(10, 89, 247, 1)') } @@ -46,11 +46,11 @@ struct StateCacheAfter { Text(this.getTotal.toString()) .fontSize(42) .fontWeight(FontWeight.Bold) - Text($r('app.string.total_price')) + Text('总价') .fontSize(16) .fontColor('rgba(0, 0, 0, 0.6)') - Button($r('app.string.reduce')) + Button('-1个') .fontSize(20) .fontWeight(FontWeight.Bold) .fontColor('rgba(10, 89, 247, 1)') @@ -72,11 +72,11 @@ struct StateCacheAfter { Text(this.count.toString()) .fontSize(42) .fontWeight(FontWeight.Bold) - Text($r('app.string.quantity')) + Text('数量') .fontSize(16) .fontColor('rgba(0, 0, 0, 0.6)') - Button($r('app.string.add')) + Button('+1个') .fontSize(20) .fontWeight(FontWeight.Bold) .fontColor('rgba(10, 89, 247, 1)') diff --git a/entry/src/main/ets/pages/StateCacheBefore.ets b/entry/src/main/ets/pages/StateCacheBefore.ets index 71b6dca3dbe84a17cc9d094b48af2fdc0b1f11d9..b6d05b9e948bea2e024a164b6fa84c09061d6d40 100644 --- a/entry/src/main/ets/pages/StateCacheBefore.ets +++ b/entry/src/main/ets/pages/StateCacheBefore.ets @@ -28,10 +28,10 @@ struct StateCacheBefore { Column() { Column({ space: 18 }) { Column() { - Text($r('app.string.apple')) + Text('苹果') .fontSize(22) .fontWeight(FontWeight.Bold) - Text($r('app.string.price', this.price.toString())) + Text('单价' + this.price) .fontSize(16) .fontColor('rgba(10, 89, 247, 1)') } @@ -41,11 +41,11 @@ struct StateCacheBefore { Text(this.total.toString()) .fontSize(42) .fontWeight(FontWeight.Bold) - Text($r('app.string.total_price')) + Text('总价') .fontSize(16) .fontColor('rgba(0, 0, 0, 0.6)') - Button($r('app.string.reduce')) + Button('-1个') .fontSize(20) .fontWeight(FontWeight.Bold) .fontColor('rgba(10, 89, 247, 1)') @@ -68,11 +68,11 @@ struct StateCacheBefore { Text(this.count.toString()) .fontSize(42) .fontWeight(FontWeight.Bold) - Text($r('app.string.quantity')) + Text('数量') .fontSize(16) .fontColor('rgba(0, 0, 0, 0.6)') - Button($r('app.string.add')) + Button('+1个') .fontSize(20) .fontWeight(FontWeight.Bold) .fontColor('rgba(10, 89, 247, 1)') diff --git a/entry/src/main/ets/pages/Status.ets b/entry/src/main/ets/pages/Status.ets index 87f47a53d30677e524623cca4222f5401496e2e5..1c0b2e9d825a58fa6d0ed44e61145507c484c087 100644 --- a/entry/src/main/ets/pages/Status.ets +++ b/entry/src/main/ets/pages/Status.ets @@ -24,13 +24,13 @@ struct SwitchStatus { build() { Column() { Column({ space: 10 }) { - Text($r('app.string.switch_status')) + Text('开关状态') .fontSize(18) .fontWeight(FontWeight.Bold) .textAlign(TextAlign.Center) .margin({ bottom: 5 }) Row() { - Text(this.isOpen ? $r('app.string.OPEN') : $r('app.string.CLOSE')) + Text(this.isOpen ? '打开' : '关闭') .fontSize(18) .fontWeight(FontWeight.Bold) Toggle({ type: ToggleType.Switch, isOn: true }) @@ -77,7 +77,7 @@ struct Counters { build() { Column() { Column({ space: 10 }) { - Text($r('app.string.counter')) + Text('计数器') .fontSize(18) .fontWeight(FontWeight.Bold) .margin({ bottom: 5 }) diff --git a/entry/src/main/ets/pages/StatusOfManagementObjectsAfter.ets b/entry/src/main/ets/pages/StatusOfManagementObjectsAfter.ets index 3e6b75cda43e70f3eb6b54c02929b86efbcd9719..74d5b1a917cc5331bfb0f58cf518249b0b683a2e 100644 --- a/entry/src/main/ets/pages/StatusOfManagementObjectsAfter.ets +++ b/entry/src/main/ets/pages/StatusOfManagementObjectsAfter.ets @@ -39,11 +39,11 @@ class Student { @Entry @ComponentV2 struct StatusOfManagementObjectsAfter { - @Local student: Student = new Student($r('app.string.student_name'),18,$r('app.string.software_engineering')); + @Local student: Student = new Student('李华', 18, '软件工程'); @Monitor('student.major.className') majorChange(monitor: IMonitor) { - console.log(`student.major.className change from ${monitor.value()?.before} to ${monitor.value()?.now}`); + console.log(`student.major.className change from ${monitor.value()?.before} to ${monitor.value()?.now}`); } build() { @@ -53,7 +53,7 @@ struct StatusOfManagementObjectsAfter { Row() { Row() { Column() { - Text($r('app.string.name_hua')) + Text('华') .fontColor('rgba(10,89,247,1)') .fontSize(24) .fontWeight(700) @@ -78,7 +78,7 @@ struct StatusOfManagementObjectsAfter { } Row() { - Text($r('app.string.years_old', this.student.age.toString())) + Text(this.student.age + '岁') .fontSize(14) .fontWeight(400) .fontColor('rgba(0,0,0,0.6)') @@ -109,7 +109,7 @@ struct StatusOfManagementObjectsAfter { .align(Alignment.Start) Row() { - Text($r('app.string.major')) + Text('专业') .fontSize(14) .fontWeight(400) .fontColor('rgba(0,0,0,0.6)') @@ -122,7 +122,7 @@ struct StatusOfManagementObjectsAfter { .height(88) Row() { - Button($r('app.string.change_major')) + Button('专业改为物联网') .width(260) .height(40) .borderRadius(23) @@ -134,7 +134,7 @@ struct StatusOfManagementObjectsAfter { .fontSize(16) .fontColor('rgba(10,89,247,1)') .onClick(() => { - this.student.major.className = $r('app.string.internet_of_things'); + this.student.major.className = '物联网'; }) } .width(295) diff --git a/entry/src/main/ets/pages/StatusOfManagementObjectsBefore.ets b/entry/src/main/ets/pages/StatusOfManagementObjectsBefore.ets index 0c04a17f68e5b2856698a877676fd1ed31cad793..c4dd9aafcce24a88846941c8ef02979955bee6d9 100644 --- a/entry/src/main/ets/pages/StatusOfManagementObjectsBefore.ets +++ b/entry/src/main/ets/pages/StatusOfManagementObjectsBefore.ets @@ -34,7 +34,7 @@ class Student { @Entry @ComponentV2 struct StatusOfManagementObjectsBefore { - @Local student: Student = new Student($r('app.string.student_name'), 18, $r('app.string.software_engineering')); + @Local student: Student = new Student('李华', 18, '软件工程'); build() { Column() { @@ -43,7 +43,7 @@ struct StatusOfManagementObjectsBefore { Row() { Row() { Column() { - Text($r('app.string.name_hua')) + Text('华') .fontColor('rgba(10,89,247,1)') .fontSize(24) .fontWeight(700) @@ -68,7 +68,7 @@ struct StatusOfManagementObjectsBefore { } Row() { - Text($r('app.string.years_old', this.student.age.toString())) + Text(this.student.age + '岁') .fontSize(14) .fontWeight(400) .fontColor('rgba(0,0,0,0.6)') @@ -99,7 +99,7 @@ struct StatusOfManagementObjectsBefore { .align(Alignment.Start) Row() { - Text($r('app.string.major')) + Text('专业') .fontSize(14) .fontWeight(400) .fontColor('rgba(0,0,0,0.6)') @@ -112,7 +112,7 @@ struct StatusOfManagementObjectsBefore { .height(88) Row() { - Button($r('app.string.change_major')) + Button('专业改为物联网') .width(260) .height(40) .borderRadius(23) @@ -124,7 +124,7 @@ struct StatusOfManagementObjectsBefore { .fontSize(16) .fontColor('rgba(10,89,247,1)') .onClick(() => { - this.student.major = $r('app.string.internet_of_things'); + this.student.major = '物联网'; }) } .width(295) diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 901e2127ee334fa79697b2f436bbcd9a74c1b930..5ffe7b77b82297a5e043fe18ba6acf971e0c1633 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -11,78 +11,6 @@ { "name": "EntryAbility_label", "value": "StatusV2" - }, - { - "name": "counter", - "value": "Counter" - }, - { - "name": "count", - "value": "%s count" - }, - { - "name": "switch_status", - "value": "Switch Status" - }, - { - "name": "OPEN", - "value": "Open" - }, - { - "name": "CLOSE", - "value": "Close" - }, - { - "name": "name_hua", - "value": "Hua" - }, - { - "name": "student_name", - "value": "Li hua" - }, - { - "name": "software_engineering", - "value": "Software Engineering" - }, - { - "name": "years_old", - "value": "%s years old" - }, - { - "name": "major", - "value": "Major" - }, - { - "name": "internet_of_things", - "value": "Internet of Things" - }, - { - "name": "change_major", - "value": "Change major to IOT" - }, - { - "name": "apple", - "value": "Apple" - }, - { - "name": "price", - "value": "Unit price %s" - }, - { - "name": "total_price", - "value": "Total price" - }, - { - "name": "reduce", - "value": "Subtract one" - }, - { - "name": "add", - "value": "Add one" - }, - { - "name": "quantity", - "value": "Quantity" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index ff606de77a309580acc802e81720315d23e73fc8..5ffe7b77b82297a5e043fe18ba6acf971e0c1633 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -11,90 +11,6 @@ { "name": "EntryAbility_label", "value": "StatusV2" - }, - { - "name": "counter", - "value": "Counter" - }, - { - "name": "count", - "value": "%s count" - }, - { - "name": "counts", - "value": " counts \uD83C\uDF4E" - }, - { - "name": "unit_price", - "value": "unit price:" - }, - { - "name": "money", - "value": "money:" - }, - { - "name": "switch_status", - "value": "Switch Status" - }, - { - "name": "OPEN", - "value": "Open" - }, - { - "name": "CLOSE", - "value": "Close" - }, - { - "name": "name_hua", - "value": "Hua" - }, - { - "name": "student_name", - "value": "Li hua" - }, - { - "name": "software_engineering", - "value": "Software Engineering" - }, - { - "name": "years_old", - "value": "%s years old" - }, - { - "name": "major", - "value": "Major" - }, - { - "name": "internet_of_things", - "value": "Internet of Things" - }, - { - "name": "change_major", - "value": "Change major to IOT" - }, - { - "name": "apple", - "value": "Apple" - }, - { - "name": "price", - "value": "Unit price %s" - }, - { - "name": "total_price", - "value": "Total price" - }, - { - "name": "reduce", - "value": "Subtract one" - }, - { - "name": "add", - "value": "Add one" - }, - { - "name": "quantity", - "value": "Quantity" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index 9caf3b1a72199c316bfd545cc4c21ee023486903..fcec8997423f33920ec7004e781d4c06db65656e 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -11,78 +11,6 @@ { "name": "EntryAbility_label", "value": "状态管理V2-场景案例" - }, - { - "name": "counter", - "value": "计数器" - }, - { - "name": "count", - "value": "%s 个" - }, - { - "name": "switch_status", - "value": "开关状态" - }, - { - "name": "OPEN", - "value": "打开" - }, - { - "name": "CLOSE", - "value": "关闭" - }, - { - "name": "name_hua", - "value": "华" - }, - { - "name": "student_name", - "value": "李华" - }, - { - "name": "software_engineering", - "value": "软件工程" - }, - { - "name": "years_old", - "value": "%s 岁" - }, - { - "name": "major", - "value": "专业" - }, - { - "name": "internet_of_things", - "value": "物联网" - }, - { - "name": "change_major", - "value": "专业改为物联网" - }, - { - "name": "apple", - "value": "苹果" - }, - { - "name": "price", - "value": "单价 %s" - }, - { - "name": "total_price", - "value": "总价" - }, - { - "name": "reduce", - "value": "-1个" - }, - { - "name": "add", - "value": "+1 个" - }, - { - "name": "quantity", - "value": "数量" } ] } \ No newline at end of file