From 384ab93e1f6b2b57c98723ddcfc47e47a49b08a4 Mon Sep 17 00:00:00 2001 From: dhf <1511447814@qq.com> Date: Wed, 18 Jun 2025 16:55:17 +0800 Subject: [PATCH] =?UTF-8?q?quickstart=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_Complete/build-profile.json5 | 2 +- .../01_Complete/hvigor/hvigor-config.json5 | 2 +- .../01_Complete/oh-package.json5 | 5 +- .../02_Complete/oh-package.json5 | 3 +- .../02_StartingPoint/build-profile.json5 | 2 +- .../hvigor/hvigor-config.json5 | 2 +- .../02_StartingPoint/oh-package.json5 | 5 +- 03_BuildItem/03_Complete/oh-package.json5 | 3 +- .../03_StartingPoint/oh-package.json5 | 3 +- .../entry/src/main/ets/pages/Index.ets | 3 - .../04_Complete/oh-package.json5 | 3 +- .../04_StartingPoint/oh-package.json5 | 3 +- .../05_Complete/build-profile.json5 | 2 +- .../entry/src/main/ets/util/BufferUtil.ets | 6 +- .../entry/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 8 +- .../entry/src/main/ets/view/TutorialView.ets | 6 +- .../05_Complete/oh-package.json5 | 3 +- .../entry/src/main/ets/pages/Index.ets | 3 - .../05_StartPoint/oh-package.json5 | 3 +- .../QS06_Complete/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../features/map/BuildProfile.ets | 4 +- .../features/map/oh-package.json5 | 4 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../QS06_Complete/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 6 +- .../default/src/main/ets/pages/Index.ets | 2 +- .../QS06_StartPoint/build-profile.json5 | 2 +- .../entry/src/main/ets/util/BufferUtil.ets | 6 +- .../entry/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 8 +- .../entry/src/main/ets/view/TutorialView.ets | 6 +- .../QS06_StartPoint/oh-package.json5 | 3 +- .../07_Complete/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../07_Complete/features/map/BuildProfile.ets | 4 +- .../07_Complete/features/map/oh-package.json5 | 4 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../07_Complete/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 6 +- .../default/src/main/ets/pages/Index.ets | 2 +- .../07_StartPoint/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../features/map/BuildProfile.ets | 4 +- .../features/map/oh-package.json5 | 4 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../07_StartPoint/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 6 +- .../default/src/main/ets/pages/Index.ets | 2 +- .../08_Complete/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../08_Complete/features/map/BuildProfile.ets | 4 +- .../08_Complete/features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../08_Complete/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../default/src/main/ets/pages/Index.ets | 4 +- .../08_StartPoint/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../static/js/main.8604981c.js | 3 - .../static/js/main.8604981c.js.LICENSE.txt | 55 - .../static/js/main.8604981c.js.map | 1 - .../features/map/BuildProfile.ets | 4 +- .../features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 83 - .../src/main/ets/view/KnowledgeMapContent.ets | 125 - .../map/src/main/ets/view/NavBarItem.ets | 39 - .../src/main/resources/rawfile/MapData.json | 321 - .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../08_StartPoint/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 6 +- .../default/src/main/ets/pages/Index.ets | 2 +- .../09_Complete/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../09_Complete/features/map/BuildProfile.ets | 4 +- .../09_Complete/features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../09_Complete/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../default/src/main/ets/pages/Index.ets | 6 +- .../09_StartPoint/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../features/map/BuildProfile.ets | 4 +- .../features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../09_StartPoint/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../default/src/main/ets/pages/Index.ets | 4 +- .../10_Complete/build-profile.json5 | 4 +- .../utils/src/main/ets/utils/Speaker.ets | 17 +- .../features/learning/oh-package.json5 | 4 +- .../10_Complete/features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/pages/ArticleDetailPage.ets | 2 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../quickstart/src/main/ets/view/Header.ets | 2 +- .../src/main/ets/view/TutorialView.ets | 6 +- 10_TextToSpeech/10_Complete/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../default/src/main/ets/pages/Index.ets | 6 +- .../10_StartPoint/build-profile.json5 | 4 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../features/map/BuildProfile.ets | 4 +- .../features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../10_StartPoint/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../default/src/main/ets/pages/Index.ets | 6 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../src/main/ets/utils/BreakpointSystem.ets | 3 +- .../utils/src/main/ets/utils/Speaker.ets | 32 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../11_Complete/features/map/BuildProfile.ets | 4 +- .../11_Complete/features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../src/main/ets/view/KnowledgeMapContent.ets | 2 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/pages/ArticleDetailPage.ets | 2 +- .../src/main/ets/pages/QuickStartPage.ets | 2 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 8 +- .../src/main/ets/view/EnablementView.ets | 8 +- .../quickstart/src/main/ets/view/Header.ets | 2 +- .../src/main/ets/view/TutorialView.ets | 8 +- .../11_Complete/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../main/ets/entryability/EntryAbility.ets | 2 + .../default/src/main/ets/pages/Index.ets | 8 +- .../11_StartPoint/build-profile.json5 | 4 +- .../utils/src/main/ets/utils/Speaker.ets | 17 +- .../features/learning/oh-package.json5 | 4 +- .../features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/pages/ArticleDetailPage.ets | 2 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 6 +- .../src/main/ets/view/EnablementView.ets | 6 +- .../quickstart/src/main/ets/view/Header.ets | 2 +- .../src/main/ets/view/TutorialView.ets | 6 +- .../11_StartPoint/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../default/src/main/ets/pages/Index.ets | 6 +- .../12_Complete/build-profile.json5 | 6 +- .../src/main/ets/utils/BreakpointSystem.ets | 3 +- .../utils/src/main/ets/utils/Speaker.ets | 32 +- .../features/learning/oh-package.json5 | 4 +- .../rawfile/course_learning/index.html | 20 +- .../static/js/main.8604981c.js | 12280 +++++++++++++++- .../12_Complete/features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../src/main/ets/view/KnowledgeMapContent.ets | 2 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/pages/ArticleDetailPage.ets | 2 +- .../src/main/ets/pages/QuickStartPage.ets | 2 +- .../src/main/ets/util/bufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 8 +- .../src/main/ets/view/EnablementView.ets | 8 +- .../quickstart/src/main/ets/view/Header.ets | 2 +- .../src/main/ets/view/TutorialView.ets | 8 +- .../resources/rawfile/EnablementData.json | 10 +- .../12_Complete/hvigor/hvigor-config.json5 | 2 +- .../12_Complete/oh-package.json5 | 5 +- .../products/default/oh-package.json5 | 10 +- .../main/ets/entryability/EntryAbility.ets | 2 + .../default/src/main/ets/pages/Index.ets | 8 +- .../commons/uicomponents/BuildProfile.ets | 4 +- .../commons/utils/BuildProfile.ets | 4 +- .../src/main/ets/utils/BreakpointSystem.ets | 3 +- .../utils/src/main/ets/utils/Speaker.ets | 32 +- .../features/learning/BuildProfile.ets | 4 +- .../features/learning/oh-package.json5 | 4 +- .../features/map/BuildProfile.ets | 4 +- .../features/map/oh-package.json5 | 4 +- .../map/src/main/ets/pages/KnowledgeMap.ets | 11 +- .../src/main/ets/view/KnowledgeMapContent.ets | 2 +- .../features/quickstart/BuildProfile.ets | 4 +- .../features/quickstart/oh-package.json5 | 4 +- .../src/main/ets/pages/ArticleDetailPage.ets | 2 +- .../src/main/ets/pages/QuickStartPage.ets | 2 +- .../src/main/ets/util/BufferUtil.ets | 6 +- .../quickstart/src/main/ets/view/Banner.ets | 8 +- .../src/main/ets/view/EnablementView.ets | 8 +- .../quickstart/src/main/ets/view/Header.ets | 2 +- .../src/main/ets/view/TutorialView.ets | 8 +- .../12_StartPoint/oh-package.json5 | 3 +- .../products/default/oh-package.json5 | 10 +- .../main/ets/entryability/EntryAbility.ets | 2 + .../default/src/main/ets/pages/Index.ets | 8 +- 264 files changed, 12930 insertions(+), 1340 deletions(-) delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/learning/src/main/resources/rawfile/course_learning/static/js/main.8604981c.js delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/learning/src/main/resources/rawfile/course_learning/static/js/main.8604981c.js.LICENSE.txt delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/learning/src/main/resources/rawfile/course_learning/static/js/main.8604981c.js.map delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/map/src/main/ets/pages/KnowledgeMap.ets delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/map/src/main/ets/view/KnowledgeMapContent.ets delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/map/src/main/ets/view/NavBarItem.ets delete mode 100644 08_DataDrivenUIUpdates/08_StartPoint/features/map/src/main/resources/rawfile/MapData.json diff --git a/01_EnvironmentSetup/01_Complete/build-profile.json5 b/01_EnvironmentSetup/01_Complete/build-profile.json5 index c033ce4..5916880 100644 --- a/01_EnvironmentSetup/01_Complete/build-profile.json5 +++ b/01_EnvironmentSetup/01_Complete/build-profile.json5 @@ -5,7 +5,7 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", } ], diff --git a/01_EnvironmentSetup/01_Complete/hvigor/hvigor-config.json5 b/01_EnvironmentSetup/01_Complete/hvigor/hvigor-config.json5 index 06b2783..5bebc97 100644 --- a/01_EnvironmentSetup/01_Complete/hvigor/hvigor-config.json5 +++ b/01_EnvironmentSetup/01_Complete/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "dependencies": { }, "execution": { diff --git a/01_EnvironmentSetup/01_Complete/oh-package.json5 b/01_EnvironmentSetup/01_Complete/oh-package.json5 index ebdda7e..32b8eee 100644 --- a/01_EnvironmentSetup/01_Complete/oh-package.json5 +++ b/01_EnvironmentSetup/01_Complete/oh-package.json5 @@ -1,10 +1,9 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "description": "Please describe the basic information.", "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/02_UseSwiperToBuildBanner/02_Complete/oh-package.json5 b/02_UseSwiperToBuildBanner/02_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/02_UseSwiperToBuildBanner/02_Complete/oh-package.json5 +++ b/02_UseSwiperToBuildBanner/02_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/02_UseSwiperToBuildBanner/02_StartingPoint/build-profile.json5 b/02_UseSwiperToBuildBanner/02_StartingPoint/build-profile.json5 index c033ce4..5916880 100644 --- a/02_UseSwiperToBuildBanner/02_StartingPoint/build-profile.json5 +++ b/02_UseSwiperToBuildBanner/02_StartingPoint/build-profile.json5 @@ -5,7 +5,7 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", } ], diff --git a/02_UseSwiperToBuildBanner/02_StartingPoint/hvigor/hvigor-config.json5 b/02_UseSwiperToBuildBanner/02_StartingPoint/hvigor/hvigor-config.json5 index 06b2783..5bebc97 100644 --- a/02_UseSwiperToBuildBanner/02_StartingPoint/hvigor/hvigor-config.json5 +++ b/02_UseSwiperToBuildBanner/02_StartingPoint/hvigor/hvigor-config.json5 @@ -1,5 +1,5 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "dependencies": { }, "execution": { diff --git a/02_UseSwiperToBuildBanner/02_StartingPoint/oh-package.json5 b/02_UseSwiperToBuildBanner/02_StartingPoint/oh-package.json5 index ebdda7e..32b8eee 100644 --- a/02_UseSwiperToBuildBanner/02_StartingPoint/oh-package.json5 +++ b/02_UseSwiperToBuildBanner/02_StartingPoint/oh-package.json5 @@ -1,10 +1,9 @@ { - "modelVersion": "5.0.0", + "modelVersion": "5.0.5", "description": "Please describe the basic information.", "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/03_BuildItem/03_Complete/oh-package.json5 b/03_BuildItem/03_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/03_BuildItem/03_Complete/oh-package.json5 +++ b/03_BuildItem/03_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/03_BuildItem/03_StartingPoint/oh-package.json5 b/03_BuildItem/03_StartingPoint/oh-package.json5 index ebdda7e..f997517 100644 --- a/03_BuildItem/03_StartingPoint/oh-package.json5 +++ b/03_BuildItem/03_StartingPoint/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/04_BuildGridAndList/04_Complete/entry/src/main/ets/pages/Index.ets b/04_BuildGridAndList/04_Complete/entry/src/main/ets/pages/Index.ets index f7a58d7..9321cfd 100644 --- a/04_BuildGridAndList/04_Complete/entry/src/main/ets/pages/Index.ets +++ b/04_BuildGridAndList/04_Complete/entry/src/main/ets/pages/Index.ets @@ -58,7 +58,6 @@ struct Index { } } -@Preview @Component struct Banner { @State bannerList: Array = [ @@ -95,7 +94,6 @@ struct Banner { } } -@Preview @Component struct TutorialItem { @Prop tutorialItem: ArticleClass; @@ -143,7 +141,6 @@ struct TutorialItem { } } -@Preview @Component struct EnablementItem { @Prop enablementItem: ArticleClass; diff --git a/04_BuildGridAndList/04_Complete/oh-package.json5 b/04_BuildGridAndList/04_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/04_BuildGridAndList/04_Complete/oh-package.json5 +++ b/04_BuildGridAndList/04_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/04_BuildGridAndList/04_StartingPoint/oh-package.json5 b/04_BuildGridAndList/04_StartingPoint/oh-package.json5 index ebdda7e..f997517 100644 --- a/04_BuildGridAndList/04_StartingPoint/oh-package.json5 +++ b/04_BuildGridAndList/04_StartingPoint/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/05_MVVMPatternDesign/05_Complete/build-profile.json5 b/05_MVVMPatternDesign/05_Complete/build-profile.json5 index 7ae3f2a..7ce8a7d 100644 --- a/05_MVVMPatternDesign/05_Complete/build-profile.json5 +++ b/05_MVVMPatternDesign/05_Complete/build-profile.json5 @@ -1,7 +1,7 @@ { "app": { "signingConfigs": [ - + ], "products": [ { diff --git a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/util/BufferUtil.ets b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/util/BufferUtil.ets index 3e11378..2799447 100644 --- a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/util/BufferUtil.ets +++ b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/util/BufferUtil.ets @@ -1,11 +1,9 @@ import { util } from '@kit.ArkTS'; -export function bufferToString(buffer: ArrayBufferLike): string { +export function bufferToString(buffer: Uint8Array): string { let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), { - stream: true - }); + let resultPut = textDecoder.decodeToString(buffer); return resultPut; } \ No newline at end of file diff --git a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/Banner.ets b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/Banner.ets index 1858232..d274e2f 100644 --- a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/Banner.ets +++ b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/Banner.ets @@ -10,9 +10,9 @@ export struct Banner { } getBannerDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('BannerData.json').then(value => { - this.bannerList = JSON.parse(bufferToString(value.buffer)) as BannerClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('BannerData.json').then(value => { + this.bannerList = JSON.parse(bufferToString(value)) as BannerClass[]; + }); } build() { diff --git a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/EnablementView.ets b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/EnablementView.ets index 2c5fd0e..38249da 100644 --- a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/EnablementView.ets +++ b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/EnablementView.ets @@ -10,9 +10,9 @@ export struct EnablementView { } getEnablementDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('EnablementData.json').then(value => { - this.enablementList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('EnablementData.json').then(value => { + this.enablementList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { @@ -54,7 +54,7 @@ struct EnablementItem { Image($r(this.enablementItem.imageSrc)) .width('100%') .objectFit(ImageFit.Cover) - .height(96) + .height(96) .borderRadius({ topLeft: 16, topRight: 16 diff --git a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/TutorialView.ets b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/TutorialView.ets index 2222e77..309e851 100644 --- a/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/TutorialView.ets +++ b/05_MVVMPatternDesign/05_Complete/entry/src/main/ets/view/TutorialView.ets @@ -10,9 +10,9 @@ export struct TutorialView { } getTutorialDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('TutorialData.json').then(value => { - this.tutorialList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('TutorialData.json').then(value => { + this.tutorialList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/05_MVVMPatternDesign/05_Complete/oh-package.json5 b/05_MVVMPatternDesign/05_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/05_MVVMPatternDesign/05_Complete/oh-package.json5 +++ b/05_MVVMPatternDesign/05_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/05_MVVMPatternDesign/05_StartPoint/entry/src/main/ets/pages/Index.ets b/05_MVVMPatternDesign/05_StartPoint/entry/src/main/ets/pages/Index.ets index f7a58d7..9321cfd 100644 --- a/05_MVVMPatternDesign/05_StartPoint/entry/src/main/ets/pages/Index.ets +++ b/05_MVVMPatternDesign/05_StartPoint/entry/src/main/ets/pages/Index.ets @@ -58,7 +58,6 @@ struct Index { } } -@Preview @Component struct Banner { @State bannerList: Array = [ @@ -95,7 +94,6 @@ struct Banner { } } -@Preview @Component struct TutorialItem { @Prop tutorialItem: ArticleClass; @@ -143,7 +141,6 @@ struct TutorialItem { } } -@Preview @Component struct EnablementItem { @Prop enablementItem: ArticleClass; diff --git a/05_MVVMPatternDesign/05_StartPoint/oh-package.json5 b/05_MVVMPatternDesign/05_StartPoint/oh-package.json5 index ebdda7e..f997517 100644 --- a/05_MVVMPatternDesign/05_StartPoint/oh-package.json5 +++ b/05_MVVMPatternDesign/05_StartPoint/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/06_LayerArchitectureDesign/QS06_Complete/build-profile.json5 b/06_LayerArchitectureDesign/QS06_Complete/build-profile.json5 index 353e68e..8805cc5 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/build-profile.json5 +++ b/06_LayerArchitectureDesign/QS06_Complete/build-profile.json5 @@ -1,6 +1,8 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + + ], "products": [ { "name": "default", diff --git a/06_LayerArchitectureDesign/QS06_Complete/commons/uicomponents/BuildProfile.ets b/06_LayerArchitectureDesign/QS06_Complete/commons/uicomponents/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/commons/uicomponents/BuildProfile.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/commons/uicomponents/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/06_LayerArchitectureDesign/QS06_Complete/commons/utils/BuildProfile.ets b/06_LayerArchitectureDesign/QS06_Complete/commons/utils/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/commons/utils/BuildProfile.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/commons/utils/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/learning/BuildProfile.ets b/06_LayerArchitectureDesign/QS06_Complete/features/learning/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/learning/BuildProfile.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/learning/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/learning/oh-package.json5 b/06_LayerArchitectureDesign/QS06_Complete/features/learning/oh-package.json5 index d983b9a..c0c6d3c 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/learning/oh-package.json5 +++ b/06_LayerArchitectureDesign/QS06_Complete/features/learning/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/map/BuildProfile.ets b/06_LayerArchitectureDesign/QS06_Complete/features/map/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/map/BuildProfile.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/map/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/map/oh-package.json5 b/06_LayerArchitectureDesign/QS06_Complete/features/map/oh-package.json5 index 202f671..27bc148 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/map/oh-package.json5 +++ b/06_LayerArchitectureDesign/QS06_Complete/features/map/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/BuildProfile.ets b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/BuildProfile.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/oh-package.json5 b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/oh-package.json5 index fcb51f0..c5f8e5c 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/oh-package.json5 +++ b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets index 3e11378..2799447 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets @@ -1,11 +1,9 @@ import { util } from '@kit.ArkTS'; -export function bufferToString(buffer: ArrayBufferLike): string { +export function bufferToString(buffer: Uint8Array): string { let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), { - stream: true - }); + let resultPut = textDecoder.decodeToString(buffer); return resultPut; } \ No newline at end of file diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/Banner.ets b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/Banner.ets index f1f455b..d8c83be 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/Banner.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/Banner.ets @@ -10,9 +10,9 @@ export struct Banner { } getBannerDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('BannerData.json').then(value => { - this.bannerList = JSON.parse(bufferToString(value.buffer)) as BannerClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('BannerData.json').then(value => { + this.bannerList = JSON.parse(bufferToString(value)) as BannerClass[]; + }); } build() { diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/EnablementView.ets b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/EnablementView.ets index 332382c..18a12fb 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/EnablementView.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/EnablementView.ets @@ -10,9 +10,9 @@ export struct EnablementView { } getEnablementDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('EnablementData.json').then(value => { - this.enablementList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('EnablementData.json').then(value => { + this.enablementList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/TutorialView.ets b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/TutorialView.ets index d0837c4..00f5101 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/TutorialView.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/features/quickstart/src/main/ets/view/TutorialView.ets @@ -10,9 +10,9 @@ export struct TutorialView { } getTutorialDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('TutorialData.json').then(value => { - this.tutorialList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('TutorialData.json').then(value => { + this.tutorialList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/06_LayerArchitectureDesign/QS06_Complete/oh-package.json5 b/06_LayerArchitectureDesign/QS06_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/oh-package.json5 +++ b/06_LayerArchitectureDesign/QS06_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/06_LayerArchitectureDesign/QS06_Complete/products/default/oh-package.json5 b/06_LayerArchitectureDesign/QS06_Complete/products/default/oh-package.json5 index efc4a7d..43b8777 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/products/default/oh-package.json5 +++ b/06_LayerArchitectureDesign/QS06_Complete/products/default/oh-package.json5 @@ -6,8 +6,8 @@ "author": "", "license": "", "dependencies": { - "@ohos/learning": "file:../../features/learning", - "@ohos/map": "file:../../features/map", - "@ohos/quickstart": "file:../../features/quickstart" + "learning": "file:../../features/learning", + "map": "file:../../features/map", + "quickstart": "file:../../features/quickstart" } } \ No newline at end of file diff --git a/06_LayerArchitectureDesign/QS06_Complete/products/default/src/main/ets/pages/Index.ets b/06_LayerArchitectureDesign/QS06_Complete/products/default/src/main/ets/pages/Index.ets index 7996aad..934c11f 100644 --- a/06_LayerArchitectureDesign/QS06_Complete/products/default/src/main/ets/pages/Index.ets +++ b/06_LayerArchitectureDesign/QS06_Complete/products/default/src/main/ets/pages/Index.ets @@ -1,4 +1,4 @@ -import { QuickStartPage } from '@ohos/quickstart'; +import { QuickStartPage } from 'quickstart'; @Entry @Component diff --git a/06_LayerArchitectureDesign/QS06_StartPoint/build-profile.json5 b/06_LayerArchitectureDesign/QS06_StartPoint/build-profile.json5 index 7ae3f2a..7ce8a7d 100644 --- a/06_LayerArchitectureDesign/QS06_StartPoint/build-profile.json5 +++ b/06_LayerArchitectureDesign/QS06_StartPoint/build-profile.json5 @@ -1,7 +1,7 @@ { "app": { "signingConfigs": [ - + ], "products": [ { diff --git a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/util/BufferUtil.ets b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/util/BufferUtil.ets index 3e11378..2799447 100644 --- a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/util/BufferUtil.ets +++ b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/util/BufferUtil.ets @@ -1,11 +1,9 @@ import { util } from '@kit.ArkTS'; -export function bufferToString(buffer: ArrayBufferLike): string { +export function bufferToString(buffer: Uint8Array): string { let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), { - stream: true - }); + let resultPut = textDecoder.decodeToString(buffer); return resultPut; } \ No newline at end of file diff --git a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/Banner.ets b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/Banner.ets index 1858232..d274e2f 100644 --- a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/Banner.ets +++ b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/Banner.ets @@ -10,9 +10,9 @@ export struct Banner { } getBannerDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('BannerData.json').then(value => { - this.bannerList = JSON.parse(bufferToString(value.buffer)) as BannerClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('BannerData.json').then(value => { + this.bannerList = JSON.parse(bufferToString(value)) as BannerClass[]; + }); } build() { diff --git a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/EnablementView.ets b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/EnablementView.ets index 2c5fd0e..38249da 100644 --- a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/EnablementView.ets +++ b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/EnablementView.ets @@ -10,9 +10,9 @@ export struct EnablementView { } getEnablementDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('EnablementData.json').then(value => { - this.enablementList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('EnablementData.json').then(value => { + this.enablementList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { @@ -54,7 +54,7 @@ struct EnablementItem { Image($r(this.enablementItem.imageSrc)) .width('100%') .objectFit(ImageFit.Cover) - .height(96) + .height(96) .borderRadius({ topLeft: 16, topRight: 16 diff --git a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/TutorialView.ets b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/TutorialView.ets index 2222e77..309e851 100644 --- a/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/TutorialView.ets +++ b/06_LayerArchitectureDesign/QS06_StartPoint/entry/src/main/ets/view/TutorialView.ets @@ -10,9 +10,9 @@ export struct TutorialView { } getTutorialDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('TutorialData.json').then(value => { - this.tutorialList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('TutorialData.json').then(value => { + this.tutorialList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/06_LayerArchitectureDesign/QS06_StartPoint/oh-package.json5 b/06_LayerArchitectureDesign/QS06_StartPoint/oh-package.json5 index ebdda7e..f997517 100644 --- a/06_LayerArchitectureDesign/QS06_StartPoint/oh-package.json5 +++ b/06_LayerArchitectureDesign/QS06_StartPoint/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/07_ArkWebPageAdaptation/07_Complete/build-profile.json5 b/07_ArkWebPageAdaptation/07_Complete/build-profile.json5 index 353e68e..d678585 100644 --- a/07_ArkWebPageAdaptation/07_Complete/build-profile.json5 +++ b/07_ArkWebPageAdaptation/07_Complete/build-profile.json5 @@ -1,6 +1,8 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + + ], "products": [ { "name": "default", diff --git a/07_ArkWebPageAdaptation/07_Complete/commons/uicomponents/BuildProfile.ets b/07_ArkWebPageAdaptation/07_Complete/commons/uicomponents/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_Complete/commons/uicomponents/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_Complete/commons/uicomponents/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_Complete/commons/utils/BuildProfile.ets b/07_ArkWebPageAdaptation/07_Complete/commons/utils/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_Complete/commons/utils/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_Complete/commons/utils/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_Complete/features/learning/BuildProfile.ets b/07_ArkWebPageAdaptation/07_Complete/features/learning/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/learning/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/learning/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_Complete/features/learning/oh-package.json5 b/07_ArkWebPageAdaptation/07_Complete/features/learning/oh-package.json5 index d983b9a..c0c6d3c 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/learning/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_Complete/features/learning/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/07_ArkWebPageAdaptation/07_Complete/features/map/BuildProfile.ets b/07_ArkWebPageAdaptation/07_Complete/features/map/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/map/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/map/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_Complete/features/map/oh-package.json5 b/07_ArkWebPageAdaptation/07_Complete/features/map/oh-package.json5 index 202f671..27bc148 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/map/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_Complete/features/map/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/BuildProfile.ets b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/oh-package.json5 b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/oh-package.json5 index fcb51f0..c5f8e5c 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets index 3e11378..2799447 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets @@ -1,11 +1,9 @@ import { util } from '@kit.ArkTS'; -export function bufferToString(buffer: ArrayBufferLike): string { +export function bufferToString(buffer: Uint8Array): string { let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), { - stream: true - }); + let resultPut = textDecoder.decodeToString(buffer); return resultPut; } \ No newline at end of file diff --git a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/Banner.ets b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/Banner.ets index 8ac27f9..5bf7d48 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/Banner.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/Banner.ets @@ -10,9 +10,9 @@ export struct Banner { } getBannerDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('BannerData.json').then(value => { - this.bannerList = JSON.parse(bufferToString(value.buffer)) as BannerClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('BannerData.json').then(value => { + this.bannerList = JSON.parse(bufferToString(value)) as BannerClass[]; + }); } build() { diff --git a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/EnablementView.ets b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/EnablementView.ets index 332382c..18a12fb 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/EnablementView.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/EnablementView.ets @@ -10,9 +10,9 @@ export struct EnablementView { } getEnablementDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('EnablementData.json').then(value => { - this.enablementList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('EnablementData.json').then(value => { + this.enablementList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/TutorialView.ets b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/TutorialView.ets index d0837c4..00f5101 100644 --- a/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/TutorialView.ets +++ b/07_ArkWebPageAdaptation/07_Complete/features/quickstart/src/main/ets/view/TutorialView.ets @@ -10,9 +10,9 @@ export struct TutorialView { } getTutorialDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('TutorialData.json').then(value => { - this.tutorialList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('TutorialData.json').then(value => { + this.tutorialList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/07_ArkWebPageAdaptation/07_Complete/oh-package.json5 b/07_ArkWebPageAdaptation/07_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/07_ArkWebPageAdaptation/07_Complete/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/07_ArkWebPageAdaptation/07_Complete/products/default/oh-package.json5 b/07_ArkWebPageAdaptation/07_Complete/products/default/oh-package.json5 index efc4a7d..43b8777 100644 --- a/07_ArkWebPageAdaptation/07_Complete/products/default/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_Complete/products/default/oh-package.json5 @@ -6,8 +6,8 @@ "author": "", "license": "", "dependencies": { - "@ohos/learning": "file:../../features/learning", - "@ohos/map": "file:../../features/map", - "@ohos/quickstart": "file:../../features/quickstart" + "learning": "file:../../features/learning", + "map": "file:../../features/map", + "quickstart": "file:../../features/quickstart" } } \ No newline at end of file diff --git a/07_ArkWebPageAdaptation/07_Complete/products/default/src/main/ets/pages/Index.ets b/07_ArkWebPageAdaptation/07_Complete/products/default/src/main/ets/pages/Index.ets index e0ef238..eb382a6 100644 --- a/07_ArkWebPageAdaptation/07_Complete/products/default/src/main/ets/pages/Index.ets +++ b/07_ArkWebPageAdaptation/07_Complete/products/default/src/main/ets/pages/Index.ets @@ -1,5 +1,5 @@ // import { QuickStartPage } from '@ohos/quickstart/'; -import { CourseLearning } from '@ohos/learning'; +import { CourseLearning } from 'learning'; @Entry diff --git a/07_ArkWebPageAdaptation/07_StartPoint/build-profile.json5 b/07_ArkWebPageAdaptation/07_StartPoint/build-profile.json5 index 353e68e..8805cc5 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/build-profile.json5 +++ b/07_ArkWebPageAdaptation/07_StartPoint/build-profile.json5 @@ -1,6 +1,8 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + + ], "products": [ { "name": "default", diff --git a/07_ArkWebPageAdaptation/07_StartPoint/commons/uicomponents/BuildProfile.ets b/07_ArkWebPageAdaptation/07_StartPoint/commons/uicomponents/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/commons/uicomponents/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/commons/uicomponents/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_StartPoint/commons/utils/BuildProfile.ets b/07_ArkWebPageAdaptation/07_StartPoint/commons/utils/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/commons/utils/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/commons/utils/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/learning/BuildProfile.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/learning/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/learning/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/learning/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/learning/oh-package.json5 b/07_ArkWebPageAdaptation/07_StartPoint/features/learning/oh-package.json5 index d983b9a..c0c6d3c 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/learning/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/learning/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/map/BuildProfile.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/map/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/map/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/map/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/map/oh-package.json5 b/07_ArkWebPageAdaptation/07_StartPoint/features/map/oh-package.json5 index 202f671..27bc148 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/map/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/map/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/BuildProfile.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/BuildProfile.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/oh-package.json5 b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/oh-package.json5 index fcb51f0..c5f8e5c 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/util/BufferUtil.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/util/BufferUtil.ets index 3e11378..2799447 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/util/BufferUtil.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/util/BufferUtil.ets @@ -1,11 +1,9 @@ import { util } from '@kit.ArkTS'; -export function bufferToString(buffer: ArrayBufferLike): string { +export function bufferToString(buffer: Uint8Array): string { let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), { - stream: true - }); + let resultPut = textDecoder.decodeToString(buffer); return resultPut; } \ No newline at end of file diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/Banner.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/Banner.ets index f1f455b..d8c83be 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/Banner.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/Banner.ets @@ -10,9 +10,9 @@ export struct Banner { } getBannerDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('BannerData.json').then(value => { - this.bannerList = JSON.parse(bufferToString(value.buffer)) as BannerClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('BannerData.json').then(value => { + this.bannerList = JSON.parse(bufferToString(value)) as BannerClass[]; + }); } build() { diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/EnablementView.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/EnablementView.ets index 332382c..18a12fb 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/EnablementView.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/EnablementView.ets @@ -10,9 +10,9 @@ export struct EnablementView { } getEnablementDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('EnablementData.json').then(value => { - this.enablementList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('EnablementData.json').then(value => { + this.enablementList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/TutorialView.ets b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/TutorialView.ets index d0837c4..00f5101 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/TutorialView.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/features/quickstart/src/main/ets/view/TutorialView.ets @@ -10,9 +10,9 @@ export struct TutorialView { } getTutorialDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('TutorialData.json').then(value => { - this.tutorialList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('TutorialData.json').then(value => { + this.tutorialList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/07_ArkWebPageAdaptation/07_StartPoint/oh-package.json5 b/07_ArkWebPageAdaptation/07_StartPoint/oh-package.json5 index ebdda7e..f997517 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_StartPoint/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/07_ArkWebPageAdaptation/07_StartPoint/products/default/oh-package.json5 b/07_ArkWebPageAdaptation/07_StartPoint/products/default/oh-package.json5 index efc4a7d..43b8777 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/products/default/oh-package.json5 +++ b/07_ArkWebPageAdaptation/07_StartPoint/products/default/oh-package.json5 @@ -6,8 +6,8 @@ "author": "", "license": "", "dependencies": { - "@ohos/learning": "file:../../features/learning", - "@ohos/map": "file:../../features/map", - "@ohos/quickstart": "file:../../features/quickstart" + "learning": "file:../../features/learning", + "map": "file:../../features/map", + "quickstart": "file:../../features/quickstart" } } \ No newline at end of file diff --git a/07_ArkWebPageAdaptation/07_StartPoint/products/default/src/main/ets/pages/Index.ets b/07_ArkWebPageAdaptation/07_StartPoint/products/default/src/main/ets/pages/Index.ets index 7996aad..934c11f 100644 --- a/07_ArkWebPageAdaptation/07_StartPoint/products/default/src/main/ets/pages/Index.ets +++ b/07_ArkWebPageAdaptation/07_StartPoint/products/default/src/main/ets/pages/Index.ets @@ -1,4 +1,4 @@ -import { QuickStartPage } from '@ohos/quickstart'; +import { QuickStartPage } from 'quickstart'; @Entry @Component diff --git a/08_DataDrivenUIUpdates/08_Complete/build-profile.json5 b/08_DataDrivenUIUpdates/08_Complete/build-profile.json5 index 353e68e..7434180 100644 --- a/08_DataDrivenUIUpdates/08_Complete/build-profile.json5 +++ b/08_DataDrivenUIUpdates/08_Complete/build-profile.json5 @@ -1,6 +1,8 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + + ], "products": [ { "name": "default", diff --git a/08_DataDrivenUIUpdates/08_Complete/commons/uicomponents/BuildProfile.ets b/08_DataDrivenUIUpdates/08_Complete/commons/uicomponents/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_Complete/commons/uicomponents/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_Complete/commons/uicomponents/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_Complete/commons/utils/BuildProfile.ets b/08_DataDrivenUIUpdates/08_Complete/commons/utils/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_Complete/commons/utils/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_Complete/commons/utils/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_Complete/features/learning/BuildProfile.ets b/08_DataDrivenUIUpdates/08_Complete/features/learning/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/learning/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/learning/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_Complete/features/learning/oh-package.json5 b/08_DataDrivenUIUpdates/08_Complete/features/learning/oh-package.json5 index d983b9a..c0c6d3c 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/learning/oh-package.json5 +++ b/08_DataDrivenUIUpdates/08_Complete/features/learning/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/08_DataDrivenUIUpdates/08_Complete/features/map/BuildProfile.ets b/08_DataDrivenUIUpdates/08_Complete/features/map/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/map/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/map/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_Complete/features/map/oh-package.json5 b/08_DataDrivenUIUpdates/08_Complete/features/map/oh-package.json5 index 202f671..27bc148 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/map/oh-package.json5 +++ b/08_DataDrivenUIUpdates/08_Complete/features/map/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/08_DataDrivenUIUpdates/08_Complete/features/map/src/main/ets/pages/KnowledgeMap.ets b/08_DataDrivenUIUpdates/08_Complete/features/map/src/main/ets/pages/KnowledgeMap.ets index 4826fa2..218b6a0 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/map/src/main/ets/pages/KnowledgeMap.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/map/src/main/ets/pages/KnowledgeMap.ets @@ -18,11 +18,12 @@ export struct KnowledgeMap { private getSections() { try { - getContext(this).resourceManager.getRawFileContent("MapData.json", (error: BusinessError, value: Uint8Array) => { - const textDecoder = util.TextDecoder.create("utf-8"); - const res = textDecoder.decodeWithStream(value, { stream: false }); - this.sections = JSON.parse(res); - }); + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent("MapData.json", + (error: BusinessError, value: Uint8Array) => { + const textDecoder = util.TextDecoder.create("utf-8"); + const res = textDecoder.decodeToString(value, { stream: false }); + this.sections = JSON.parse(res); + }); } catch (error) { console.error(`callback getRawFileContent failed, error is ${JSON.stringify(error)}`) } diff --git a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/BuildProfile.ets b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/oh-package.json5 b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/oh-package.json5 index fcb51f0..c5f8e5c 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/oh-package.json5 +++ b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets index 3e11378..2799447 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/util/BufferUtil.ets @@ -1,11 +1,9 @@ import { util } from '@kit.ArkTS'; -export function bufferToString(buffer: ArrayBufferLike): string { +export function bufferToString(buffer: Uint8Array): string { let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }); - let resultPut = textDecoder.decodeWithStream(new Uint8Array(buffer), { - stream: true - }); + let resultPut = textDecoder.decodeToString(buffer); return resultPut; } \ No newline at end of file diff --git a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/Banner.ets b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/Banner.ets index 8ac27f9..5bf7d48 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/Banner.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/Banner.ets @@ -10,9 +10,9 @@ export struct Banner { } getBannerDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('BannerData.json').then(value => { - this.bannerList = JSON.parse(bufferToString(value.buffer)) as BannerClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('BannerData.json').then(value => { + this.bannerList = JSON.parse(bufferToString(value)) as BannerClass[]; + }); } build() { diff --git a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/EnablementView.ets b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/EnablementView.ets index dd7eff7..cc68118 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/EnablementView.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/EnablementView.ets @@ -10,9 +10,9 @@ export struct EnablementView { } getEnablementDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('EnablementData.json').then(value => { - this.enablementList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('EnablementData.json').then(value => { + this.enablementList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/TutorialView.ets b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/TutorialView.ets index d0837c4..00f5101 100644 --- a/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/TutorialView.ets +++ b/08_DataDrivenUIUpdates/08_Complete/features/quickstart/src/main/ets/view/TutorialView.ets @@ -10,9 +10,9 @@ export struct TutorialView { } getTutorialDataFromJSON() { - getContext(this).resourceManager.getRawFileContent('TutorialData.json').then(value => { - this.tutorialList = JSON.parse(bufferToString(value.buffer)) as ArticleClass[]; - }) + this.getUIContext().getHostContext()?.resourceManager.getRawFileContent('TutorialData.json').then(value => { + this.tutorialList = JSON.parse(bufferToString(value)) as ArticleClass[]; + }); } build() { diff --git a/08_DataDrivenUIUpdates/08_Complete/oh-package.json5 b/08_DataDrivenUIUpdates/08_Complete/oh-package.json5 index ebdda7e..f997517 100644 --- a/08_DataDrivenUIUpdates/08_Complete/oh-package.json5 +++ b/08_DataDrivenUIUpdates/08_Complete/oh-package.json5 @@ -4,7 +4,6 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.18", - "@ohos/hamock": "1.0.0" + } } diff --git a/08_DataDrivenUIUpdates/08_Complete/products/default/oh-package.json5 b/08_DataDrivenUIUpdates/08_Complete/products/default/oh-package.json5 index 6ecfca8..a90a640 100644 --- a/08_DataDrivenUIUpdates/08_Complete/products/default/oh-package.json5 +++ b/08_DataDrivenUIUpdates/08_Complete/products/default/oh-package.json5 @@ -6,10 +6,10 @@ "author": "", "license": "", "dependencies": { - "@ohos/learning": "file:../../features/learning", - "@ohos/quickstart": "file:../../features/quickstart", - "@ohos/map": "file:../../features/map", - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "learning": "file:../../features/learning", + "quickstart": "file:../../features/quickstart", + "map": "file:../../features/map", + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } \ No newline at end of file diff --git a/08_DataDrivenUIUpdates/08_Complete/products/default/src/main/ets/pages/Index.ets b/08_DataDrivenUIUpdates/08_Complete/products/default/src/main/ets/pages/Index.ets index 7adf539..4aace4a 100644 --- a/08_DataDrivenUIUpdates/08_Complete/products/default/src/main/ets/pages/Index.ets +++ b/08_DataDrivenUIUpdates/08_Complete/products/default/src/main/ets/pages/Index.ets @@ -1,5 +1,5 @@ -// import { CourseLearning } from '@ohos/learning'; -import { KnowledgeMap } from '@ohos/map'; +// import { CourseLearning } from 'learning'; +import { KnowledgeMap } from 'map'; @Entry @Component diff --git a/08_DataDrivenUIUpdates/08_StartPoint/build-profile.json5 b/08_DataDrivenUIUpdates/08_StartPoint/build-profile.json5 index 353e68e..d678585 100644 --- a/08_DataDrivenUIUpdates/08_StartPoint/build-profile.json5 +++ b/08_DataDrivenUIUpdates/08_StartPoint/build-profile.json5 @@ -1,6 +1,8 @@ { "app": { - "signingConfigs": [], + "signingConfigs": [ + + ], "products": [ { "name": "default", diff --git a/08_DataDrivenUIUpdates/08_StartPoint/commons/uicomponents/BuildProfile.ets b/08_DataDrivenUIUpdates/08_StartPoint/commons/uicomponents/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_StartPoint/commons/uicomponents/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_StartPoint/commons/uicomponents/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_StartPoint/commons/utils/BuildProfile.ets b/08_DataDrivenUIUpdates/08_StartPoint/commons/utils/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_StartPoint/commons/utils/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_StartPoint/commons/utils/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_StartPoint/features/learning/BuildProfile.ets b/08_DataDrivenUIUpdates/08_StartPoint/features/learning/BuildProfile.ets index 3a501e5..6033e79 100644 --- a/08_DataDrivenUIUpdates/08_StartPoint/features/learning/BuildProfile.ets +++ b/08_DataDrivenUIUpdates/08_StartPoint/features/learning/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.0'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/08_DataDrivenUIUpdates/08_StartPoint/features/learning/oh-package.json5 b/08_DataDrivenUIUpdates/08_StartPoint/features/learning/oh-package.json5 index d983b9a..c0c6d3c 100644 --- a/08_DataDrivenUIUpdates/08_StartPoint/features/learning/oh-package.json5 +++ b/08_DataDrivenUIUpdates/08_StartPoint/features/learning/oh-package.json5 @@ -6,7 +6,7 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@ohos/utils": "file:../../commons/utils", - "@ohos/uicomponents": "file:../../commons/uicomponents" + "utils": "file:../../commons/utils", + "uicomponents": "file:../../commons/uicomponents" } } diff --git a/08_DataDrivenUIUpdates/08_StartPoint/features/learning/src/main/resources/rawfile/course_learning/static/js/main.8604981c.js b/08_DataDrivenUIUpdates/08_StartPoint/features/learning/src/main/resources/rawfile/course_learning/static/js/main.8604981c.js deleted file mode 100644 index 6ca6c4d..0000000 --- a/08_DataDrivenUIUpdates/08_StartPoint/features/learning/src/main/resources/rawfile/course_learning/static/js/main.8604981c.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.8604981c.js.LICENSE.txt */ -(()=>{var e={132:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case a:case l:case i:case d:case p:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case m:case h:case u:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.ForwardRef=f,t.isMemo=function(e){return g(e)===h}},816:(e,t,n)=>{"use strict";e.exports=n(132)},730:(e,t,n)=>{"use strict";var r=n(43),o=n(853);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n