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 0000000000000000000000000000000000000000..1a1427fd61e4318395da9d2f08c27ac7e0e48949 --- /dev/null +++ b/ArkUI/entry/src/main/ets/pages/NavigationJumpToPageWithWhiteScreen.ets @@ -0,0 +1,43 @@ +/* +* 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