diff --git a/build-profile.json5 b/build-profile.json5 index c033ce4278fb0641d84107c3c134047ac487368e..e8de1a3cb6ba71c60762653ebac9cfdc1cfa0132 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -5,7 +5,7 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.4(16)", "runtimeOS": "HarmonyOS", } ], diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index c1a599e95661375a67024429e268fe67d9abfaa3..76660e6c09944917e62f54a7a10bf82d59457bcd 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -73,7 +73,7 @@ struct Index { .backgroundColor(Color.White) .borderRadius($r('app.integer.search_border_radius')) .onClick(()=>{ - promptAction.showToast({ message: $r('app.string.component_stack_other_function')}); + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.component_stack_other_function')}); }); Stack({ alignContent: Alignment.Top }) { @@ -106,7 +106,7 @@ struct Index { ProductList() .width(StackConstant.FULL_PERCENT) - .height(px2vp(this.screenHeight - this.statusHeight - this.bottomHeight) - StackConstant.USED_SPACE) + .height(this.getUIContext().px2vp(this.screenHeight - this.statusHeight - this.bottomHeight) - StackConstant.USED_SPACE) } .margin({ top: StackConstant.MARGIN_TOP }) } diff --git a/entry/src/main/ets/view/IconView.ets b/entry/src/main/ets/view/IconView.ets index b1ef39bb7cc43ebb6615015158176a9c5f4c465d..f193aedab97bfdb56ff3743ee46a87badc208a5e 100644 --- a/entry/src/main/ets/view/IconView.ets +++ b/entry/src/main/ets/view/IconView.ets @@ -42,7 +42,7 @@ struct IconView1 { .backgroundColor(Color.White) .borderRadius($r('app.integer.icon_view_border_radius')) .onClick(()=>{ - promptAction.showToast({ message: $r('app.string.component_stack_other_function')}); + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.component_stack_other_function')}); }) } } @@ -71,7 +71,7 @@ struct IconView2 { .backgroundColor(Color.White) .borderRadius($r('app.integer.icon_view_border_radius')) .onClick(()=>{ - promptAction.showToast({ message: $r('app.string.component_stack_other_function')}); + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.component_stack_other_function')}); }) } } @@ -98,7 +98,7 @@ struct IconView3 { .height($r('app.integer.icon_view_height3')) .justifyContent(FlexAlign.Center) .onClick(()=>{ - promptAction.showToast({ message: $r('app.string.component_stack_other_function')}); + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.component_stack_other_function')}); }) } } diff --git a/entry/src/main/ets/view/ProductList.ets b/entry/src/main/ets/view/ProductList.ets index 15319ac6ab8412bb0d1327f3665c4704e02cd48d..33e5d1016c46dd681e2a6ef00a10265f77fc0dd8 100644 --- a/entry/src/main/ets/view/ProductList.ets +++ b/entry/src/main/ets/view/ProductList.ets @@ -74,7 +74,7 @@ export struct ProductList { .backgroundColor(Color.White) .borderRadius($r('app.integer.water_flow_column_border_radius')) .onClick(()=>{ - promptAction.showToast({ message: $r('app.string.component_stack_other_function')}); + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.component_stack_other_function')}); }); } }, (item: ProductDataModel) => item.id.toString())