From 44de21148e03b69b3fbe817cd0b2c7e7b6a12ecb Mon Sep 17 00:00:00 2001 From: Lince Liu <353627866@qq.com> Date: Sun, 29 Sep 2024 07:20:32 +0000 Subject: [PATCH 1/2] update README.md. Signed-off-by: Lince Liu <353627866@qq.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ded0256..c868ef6 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ │ ├──entryability │ │ └──EntryAbility.ets // 程序入口 │ └──pages -│ ├──EntryPageOne.ets // 页面2 -│ ├──EntryPageTwo.ets // 页面1 +│ ├──EntryPageOne.ets // 页面1 +│ ├──EntryPageTwo.ets // 页面2 │ └──Index.ets // 界面实现 ├──entry/src/main/resources // 应用资源目录 ├──harA -- Gitee From 6dc5ee3a6a9e982dc92ee4d8ecc1558eb8a544ba Mon Sep 17 00:00:00 2001 From: lloyd <754415+llince@user.noreply.gitee.com> Date: Mon, 14 Oct 2024 10:41:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90Navigation=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E3=80=91=E6=B7=BB=E5=8A=A0=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E7=89=88README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README.en.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..0fa099c --- /dev/null +++ b/README.en.md @@ -0,0 +1,66 @@ +# Navigation System Route + +### Overview + +This sample provides system route verification. The system route table redirects to the page of a module (HSP/HAR), without the need to configure the dependency between different modules to jump. When a page is redirected, the page not redirected and loaded page will not be loaded. This resolves the dependency and coupling issues across different modules and the excessive loading time of the home page. + +Due to environment differences, you are not advised to compile the code after downloading it. Instead, you need to create a project and compile the code by referring to the sample code. + +### Preview +![image](screenshots/device/navigation_router.gif) + +### How to Use + +1. The home page provides a **NavIndex** navigation page. You can tap buttons to go to different pages from HARs and HSPs. + +2. Each HAR or HSP page also provides buttons for jumping to other pages. + +### Project Directory + +``` +├──entry/src/main/ets/ +│ ├──common +│ │ └──utils +│ │ └──Logger.ets // Log printing encapsulation +│ ├──entryability +│ │ └──EntryAbility.ets // Program entry +│ └──pages +│ ├──EntryPageOne.ets // Page 2 +│ ├──EntryPageTwo.ets // Page 1 +│ └──Index.ets // Page implementation +├──entry/src/main/resources // App resources +├──harA +├──harB +├──hspA +└──hspB +``` + +### How to Implement + +1. Create hapA, harA, hspA, and hspB. + +2. Add the route table configuration to the **module.json5** file of the target module to redirect to. + +3. Create the **route_map.json** file in **resources/base/profile** of the project directory. + +4. On the target page, configure the @Builder decorated entry function. The function name must be the same as the value of** buildFunction** in the **router_map.json** configuration file. + +5. The application can call **pushDestinationByName** to obtain the error information about the target page. + +### Required Permissions + +N/A + +### Constraints + +1. The sample app is supported only on Huawei phones running the standard system. + +2. The HarmonyOS version must be HarmonyOS NEXT Developer Beta1 or later. + +3. The DevEco Studio version must be DevEco Studio NEXT Developer Beta1 or later. + +4. The HarmonyOS SDK version must be HarmonyOS NEXT Developer Beta1 or later. + +### Note + +All HSP modules need to be referenced during running. Tap **Run** > **entry** to start building your app or service after completing running settings. -- Gitee