diff --git a/README.en.md b/README.en.md index 06da7f42b910c69304348ec578e387c19a38856d..e117a1b9443d4d4416dafe4d7a76f96a97a76a7d 100644 --- a/README.en.md +++ b/README.en.md @@ -1,9 +1,11 @@ # App Navigation Design ### Overview + This sample uses an independent router module and dynamic loading method to resolve the issue of routing dependency coupling between multiple HARs/HSPs under a **Navigation** component. ### Preview + ![Route navigation effect preview](screenshots/device/demonstration.en.gif) ### Project Directory @@ -53,6 +55,7 @@ This sample uses an independent router module and dynamic loading method to reso ``` ### How to Implement + 1. Extract the routing feature as an independent module named RouterModule in the format of a .har package. 2. The RouterModule manages routes internally and exposes a RouterModule object for other modules to use. 3. Use the main entry module as the dependency registration center of service modules. Use the **Navigation** component in the entry module and configure its dependencies on the service modules. @@ -61,13 +64,15 @@ This sample uses an independent router module and dynamic loading method to reso ![Module dependencies](screenshots/device/module_dependency.jpg) ### Required Permissions + N/A + ### Constraints -1. The sample app is supported only on Huawei phones running the standard system. +1. The sample is only supported on Huawei phones with standard systems. -2. The HarmonyOS version must be HarmonyOS NEXT Developer Beta1 or later. +2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. -3. The DevEco Studio version must be DevEco Studio NEXT Developer Beta1 or later. +3. The DevEco Studio version must be DevEco Studio 5.0.0 Release or later. -4. The HarmonyOS SDK version must be HarmonyOS NEXT Developer Beta1 or later. +4. The HarmonyOS SDK version must be HarmonyOS 5.0.0 Release SDK or later. diff --git a/README.md b/README.md index 34c0b20df50312cc0582f1643c334b7ec417cb4e..1ee3c66d611450b989492b679299d0afb7983def 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ # 基于路由模块和动态加载实现应用页面路由导航功能 ### 介绍 + 通过设计单独的路由模块和动态加载方法,将路由功能抽取为单独的模块供其他模块使用,实现业务模块间的解耦。帮助开发者在页面跳转开发场景中,解决了一个Navigation组件下多har/hsp间路由跳转依赖耦合问题。 ### 效果预览 + ![路由导航效果预览](screenshots/device/demonstration.gif) ### 工程目录 + 工程的目录结构 + ``` ├──entry // 入口模块 │ ├──build-profile.json5 // 编译配置文件,其中arkOptions需配置动态import依赖的包名 @@ -53,6 +57,7 @@ ``` ### 具体实现 + 1. 将路由功能抽取成单独的模块并以har包形式存在,命名为RouterModule。 2. RouterModule内部对路由进行管理,对外暴露RouterModule对象供其他模块使用。 3. 将主入口模块作为其他业务模块的依赖注册中心,在入口模块中使用Navigation组件并依赖其他业务模块。 @@ -61,7 +66,9 @@ ![路由导航效果预览](screenshots/device/module_dependency.jpg) ### 相关权限 + 不涉及。 + ### 约束与限制 1. 本示例仅支持标准系统上运行,支持设备:华为手机。 @@ -70,4 +77,4 @@ 3. DevEco Studio版本:DevEco Studio 5.0.0 Release及以上。 -4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。 \ No newline at end of file +4. HarmonyOS SDK版本:HarmonyOS 5.0.0 Release SDK及以上。