From 9f6b65dd72188be8b847f32436e79c8b8559c926 Mon Sep 17 00:00:00 2001 From: ywcoder <1104410818@qq.com> Date: Wed, 25 Jun 2025 15:45:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9EFAQ=EF=BC=9ANavigation?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2=E7=99=BD=E5=B1=8F=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=8E=9F=E5=9B=A0=E6=98=AF=E4=BB=80=E4=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NavigationJumpToPageWithWhiteScreen.ets | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets diff --git a/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets b/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets new file mode 100644 index 0000000..1016cba --- /dev/null +++ b/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets @@ -0,0 +1,42 @@ +/* +* Copyright (c) 2024 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* +* FAQ:Navigation跳转页面白屏,可能原因是什么? +*/ + +// [Start NavigationJumpToPageWithWhiteScreen] +// 跳转页面入口函数 +@Builder +export function pageOneBuilder() { + NavigationJumpToPageWithWhiteScreen(); +} + +@Entry +@Component +struct NavigationJumpToPageWithWhiteScreen { + pathStack: NavPathStack = new NavPathStack(); + + build() { + NavDestination() { + } + .title('PageOne') + .onReady((context: NavDestinationContext) => { + this.pathStack = context.pathStack; + }) + } +} + +// [End NavigationJumpToPageWithWhiteScreen] \ No newline at end of file -- Gitee From 4e0546e855792fcfbf49dd48ba8ae5d5b56a50bc Mon Sep 17 00:00:00 2001 From: ywcoder <1104410818@qq.com> Date: Wed, 25 Jun 2025 15:47:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9EFAQ=EF=BC=9ANavigation?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2=E7=99=BD=E5=B1=8F=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=8E=9F=E5=9B=A0=E6=98=AF=E4=BB=80=E4=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets | 1 + 1 file changed, 1 insertion(+) diff --git a/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets b/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets index 1016cba..1a1427f 100644 --- a/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets +++ b/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets @@ -31,6 +31,7 @@ struct NavigationJumpToPageWithWhiteScreen { build() { NavDestination() { + // ... } .title('PageOne') .onReady((context: NavDestinationContext) => { -- Gitee