From a4b099b076273cdd0b9c36b8538065ea6560cf7a Mon Sep 17 00:00:00 2001 From: kl <2352009235@qq.com> Date: Mon, 17 Mar 2025 11:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=97=B6API=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++-- .../src/main/ets/view/play/NavigationView.ets | 30 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index bd9a725..17d20ea 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,6 @@ ### 约束与限制 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 -2. HarmonyOS系统:HarmonyOS NEXT Developer Beta1及以上。 -3. DevEco Studio版本:DevEco Studio NEXT Developer Beta1及以上。 -4. HarmonyOS SDK版本:HarmonyOS NEXT Developer Beta1 SDK及以上。 +2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 +3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 +4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file diff --git a/entry/src/main/ets/view/play/NavigationView.ets b/entry/src/main/ets/view/play/NavigationView.ets index b28e999..5539d68 100644 --- a/entry/src/main/ets/view/play/NavigationView.ets +++ b/entry/src/main/ets/view/play/NavigationView.ets @@ -13,6 +13,7 @@ * limitations under the License. */ +import { router } from '@kit.ArkUI'; import { CommonConstants } from '../../common/constants/CommonConstant'; /** @@ -21,21 +22,22 @@ import { CommonConstants } from '../../common/constants/CommonConstant'; @Component export struct NavigationView { build() { - Navigator({ target: CommonConstants.HOME_PAGE, type: NavigationType.Back }) { - Row({ space: CommonConstants.SPACE_NAVIGATION }) { - Image($r('app.media.ic_back')) - .width(CommonConstants.WIDTH_BACK_ICON) - .height(CommonConstants.HEIGHT_BACK_ICON) - .objectFit(ImageFit.Contain) + Row({ space: CommonConstants.SPACE_NAVIGATION }) { + Image($r('app.media.ic_back')) + .width(CommonConstants.WIDTH_BACK_ICON) + .height(CommonConstants.HEIGHT_BACK_ICON) + .objectFit(ImageFit.Contain) + .onClick(() => { + router.back(); + }) - Text($r('app.string.movie')) - .fontSize(CommonConstants.FONT_SIZE_TITLE) - .fontWeight(CommonConstants.FONT_WEIGHT_BOLD) - .fontColor($r('app.color.start_window_background')) - .textAlign(TextAlign.Center) - .margin(CommonConstants.MARGIN_PLAY_PAGE) - .lineHeight(CommonConstants.LINE_HEIGHT_NAVIGATION) - } + Text($r('app.string.movie')) + .fontSize(CommonConstants.FONT_SIZE_TITLE) + .fontWeight(CommonConstants.FONT_WEIGHT_BOLD) + .fontColor($r('app.color.start_window_background')) + .textAlign(TextAlign.Center) + .margin(CommonConstants.MARGIN_PLAY_PAGE) + .lineHeight(CommonConstants.LINE_HEIGHT_NAVIGATION) } .position({ x: CommonConstants.LEFT_POSITION, y: CommonConstants.START_POSITION }) } -- Gitee