From fbf0a58412114700e5524c6ead33a2053a654b97 Mon Sep 17 00:00:00 2001 From: adslk Date: Thu, 25 Aug 2022 20:30:16 +0800 Subject: [PATCH] update IDE 992 Signed-off-by: adslk --- DFX/JsDotTest/.gitignore | 8 + DFX/JsDotTest/README_zh.md | 2 +- .../main/js/MainAbility/pages/index/index.hml | 18 +- DFX/JsDotTest/package.json | 6 +- FileManager/FileIo/.gitignore | 8 + FileManager/FileIo/README_zh.md | 2 +- .../src/main/ets/MainAbility/pages/Index.ets | 2 +- .../AdaptiveCapabilities/.gitignore | 8 + .../AdaptiveCapabilities/README_zh.md | 2 +- .../AdaptiveCapabilities/package.json | 6 +- .../JsAdaptiveCapabilities/.gitignore | 8 + .../JsAdaptiveCapabilities/README_zh.md | 2 +- .../JsAdaptiveCapabilities/entry/package.json | 24 +- .../JsAdaptiveCapabilities/package.json | 28 +- Network/UploadDownload/entry/package.json | 24 +- .../src/main/ets/MainAbility/pages/Index.ets | 22 +- .../src/main/ets/MainAbility/pages/Upload.ets | 11 +- Network/UploadDownload/package.json | 36 +- .../src/main/ets/MainAbility/pages/index.ets | 6 +- .../entry/src/main/ets/pages/Index.ets | 21 +- .../src/main/ets/MainAbility/pages/Index.ets | 6 +- .../src/main/ets/ServiceAbility/service.ts | 119 ++-- .../ets/MainAbility/component/ContactInfo.ets | 25 +- .../src/main/ets/Application/AbilityStage.ts | 6 +- .../src/main/ets/MainAbility/MainAbility.ts | 64 +- .../entry/src/main/ets/model/Logger.ts | 56 +- Telephony/MobileNetwork/package.json | 30 +- .../screenshots/device/index.png | Bin 38754 -> 26922 bytes UI/AtomicLayout/.gitignore | 8 + UI/AtomicLayout/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/fixed/index.hml | 14 +- .../src/main/js/default/pages/fixed/index.js | 24 +- .../src/main/js/default/pages/hide/index.hml | 18 +- .../src/main/js/default/pages/hide/index.js | 18 +- .../src/main/js/default/pages/index/index.hml | 6 +- .../src/main/js/default/pages/index/index.js | 12 +- .../js/default/pages/percentage/index.hml | 18 +- .../main/js/default/pages/percentage/index.js | 18 +- UI/AtomicLayout/package.json | 6 +- UI/Badge/.gitignore | 8 + UI/Badge/README_zh.md | 2 +- UI/Badge/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.css | 3 + .../src/main/js/default/pages/index/index.hml | 26 +- .../src/main/js/default/pages/index/index.js | 88 +-- UI/Badge/package.json | 6 +- UI/International/.gitignore | 8 + UI/International/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../entry/src/main/js/default/i18n/zh-CN.json | 1 - .../src/main/js/default/pages/index/index.hml | 16 +- .../src/main/js/default/pages/index/index.js | 50 +- UI/International/package.json | 6 +- UI/JSComponments/.gitignore | 8 + UI/JSComponments/README_zh.md | 2 +- .../entry/src/main/js/MainAbility/app.js | 12 +- .../main/js/MainAbility/pages/comp/comp.hml | 16 +- .../main/js/MainAbility/pages/comp/comp.js | 32 +- .../js/MainAbility/pages/details/details.hml | 8 +- .../js/MainAbility/pages/details/details.js | 12 +- .../main/js/MainAbility/pages/index/index.hml | 394 +++++------ .../main/js/MainAbility/pages/index/index.js | 202 +++--- UI/JSComponments/package.json | 6 +- .../src/main/js/default/pages/index/index.hml | 1 + UI/JsAdaptivePortalList/.gitignore | 8 + UI/JsAdaptivePortalList/README_zh.md | 2 +- .../entry/src/main/js/MainAbility/app.js | 12 +- .../js/MainAbility/common/template-tabbar.hml | 8 +- .../main/js/MainAbility/pages/index/index.hml | 100 +-- .../main/js/MainAbility/pages/index/index.js | 52 +- UI/JsAdaptivePortalList/package.json | 6 +- UI/JsAdaptivePortalPage/.gitignore | 8 + UI/JsAdaptivePortalPage/README_zh.md | 2 +- UI/JsAdaptivePortalPage/entry/package.json | 2 +- .../entry/src/main/js/MainAbility/app.js | 12 +- .../MainAbility/common/template-card-item.css | 2 +- .../MainAbility/common/template-card-item.hml | 14 +- .../common/template-group-header.hml | 14 +- .../js/MainAbility/common/template-tabbar.css | 2 + .../js/MainAbility/common/template-tabbar.hml | 8 +- .../main/js/MainAbility/pages/index/index.hml | 336 ++++----- .../main/js/MainAbility/pages/index/index.js | 72 +- UI/JsAdaptivePortalPage/package.json | 6 +- UI/JsAdaptiveServiceWidget/.gitignore | 8 + UI/JsAdaptiveServiceWidget/README_zh.md | 2 +- .../entry/src/main/js/FormAbility/Logger.js | 34 +- .../entry/src/main/js/FormAbility/form.js | 299 ++++---- .../entry/src/main/js/MainAbility/app.js | 27 +- .../main/js/MainAbility/pages/index/index.css | 2 +- .../main/js/MainAbility/pages/index/index.hml | 12 +- .../main/js/MainAbility/pages/index/index.js | 12 +- .../src/main/js/complex/pages/index/index.hml | 64 +- .../src/main/js/grid/pages/index/index.css | 1 + .../src/main/js/grid/pages/index/index.hml | 48 +- .../src/main/js/imgText/pages/index/index.hml | 28 +- .../main/js/immersive/pages/index/index.hml | 12 +- .../src/main/js/text/pages/index/index.hml | 18 +- UI/JsAdaptiveServiceWidget/package.json | 6 +- UI/JsAnimation/.gitignore | 8 + UI/JsAnimation/README_zh.md | 2 +- UI/JsAnimation/package.json | 6 +- UI/JsAnimationStyle/.gitignore | 8 + UI/JsAnimationStyle/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../compositeanimation/compositeanimation.css | 11 +- .../compositeanimation/compositeanimation.hml | 6 +- .../compositeanimation/compositeanimation.js | 7 +- .../default/pages/animation/index/index.css | 35 +- .../default/pages/animation/index/index.hml | 24 +- .../js/default/pages/animation/index/index.js | 46 +- .../default/pages/animation/rotate/rotate.css | 8 +- .../default/pages/animation/rotate/rotate.hml | 6 +- .../default/pages/animation/rotate/rotate.js | 7 +- .../default/pages/animation/scale/scale.css | 6 +- .../default/pages/animation/scale/scale.hml | 6 +- .../js/default/pages/animation/scale/scale.js | 7 +- .../pages/animation/translate/translate.css | 8 +- .../pages/animation/translate/translate.hml | 6 +- .../pages/animation/translate/translate.js | 7 +- .../js/default/pages/customfont/index.css | 20 +- .../js/default/pages/customfont/index.hml | 14 +- .../main/js/default/pages/customfont/index.js | 7 +- .../main/js/default/pages/gradient/index.css | 25 +- .../main/js/default/pages/gradient/index.hml | 24 +- .../main/js/default/pages/gradient/index.js | 7 +- .../src/main/js/default/pages/index/index.css | 1 + .../src/main/js/default/pages/index/index.hml | 8 +- .../src/main/js/default/pages/index/index.js | 46 +- .../cardtargetpage/cardtargetpage.css | 1 + .../cardtargetpage/cardtargetpage.hml | 6 +- .../cardtargetpage/cardtargetpage.js | 12 +- .../cardtransition/cardtransition.css | 2 + .../cardtransition/cardtransition.hml | 18 +- .../transitions/customtarget/customtarget.css | 1 + .../transitions/customtarget/customtarget.hml | 6 +- .../transitions/customtarget/customtarget.js | 12 +- .../customtransition/customtransition.css | 1 + .../customtransition/customtransition.hml | 2 +- .../customtransition/customtransition.js | 16 +- .../default/pages/transitions/index/index.hml | 6 +- .../default/pages/transitions/index/index.js | 36 +- .../sharedelement/sharedelement.css | 6 +- .../sharedelement/sharedelement.hml | 3 +- .../sharedelement/sharedelement.js | 16 +- .../sharedtargetpage/sharedtargetpage.css | 6 +- .../sharedtargetpage/sharedtargetpage.hml | 3 +- .../sharedtargetpage/sharedtargetpage.js | 12 +- UI/JsAnimationStyle/package.json | 6 +- UI/JsAnimator/.gitignore | 8 + UI/JsAnimator/README_zh.md | 2 +- .../entry/src/main/js/MainAbility/app.js | 12 +- .../main/js/MainAbility/pages/index/index.css | 84 +-- UI/JsAnimator/package.json | 6 +- UI/JsBasicComponents/.gitignore | 8 + UI/JsBrightness/.gitignore | 8 + UI/JsBrightness/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.hml | 12 +- .../src/main/js/default/pages/index/index.js | 18 +- UI/JsBrightness/package.json | 6 +- UI/JsCanvas/.gitignore | 8 + UI/JsCanvas/README_zh.md | 2 +- UI/JsCanvas/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.hml | 47 +- .../src/main/js/default/pages/index/index.js | 224 +++--- UI/JsCanvas/package.json | 6 +- UI/JsDevice/.gitignore | 8 + UI/JsDevice/README_zh.md | 2 +- UI/JsDevice/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/common/common.css | 2 +- .../default/pages/batteryInfo/batteryInfo.hml | 20 +- .../default/pages/batteryInfo/batteryInfo.js | 148 ++-- .../default/pages/deviceInfo/deviceInfo.hml | 32 +- .../js/default/pages/deviceInfo/deviceInfo.js | 76 +- .../src/main/js/default/pages/index/index.css | 15 + .../src/main/js/default/pages/index/index.hml | 21 +- .../src/main/js/default/pages/index/index.js | 45 +- .../systemProperties/systemProperties.css | 1 + .../systemProperties/systemProperties.hml | 38 +- .../systemProperties/systemProperties.js | 204 +++--- UI/JsDevice/package.json | 6 +- UI/JsDialog/.gitignore | 8 + UI/JsDialog/README_zh.md | 2 +- UI/JsDialog/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.hml | 110 +-- .../src/main/js/default/pages/index/index.js | 82 +-- UI/JsDialog/package.json | 6 +- UI/chart/.gitignore | 8 + UI/chart/README_zh.md | 2 +- UI/chart/entry/package.json | 2 +- UI/chart/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/bar/index.css | 2 +- .../src/main/js/default/pages/bar/index.hml | 2 +- .../src/main/js/default/pages/bar/index.js | 60 +- .../src/main/js/default/pages/guage/index.css | 2 +- .../src/main/js/default/pages/guage/index.hml | 6 +- .../src/main/js/default/pages/index/index.hml | 12 +- .../src/main/js/default/pages/index/index.js | 12 +- .../src/main/js/default/pages/line/index.css | 2 +- .../src/main/js/default/pages/line/index.hml | 2 +- .../src/main/js/default/pages/line/index.js | 202 +++--- .../main/js/default/pages/loading/index.css | 2 +- .../main/js/default/pages/loading/index.hml | 2 +- .../main/js/default/pages/loading/index.js | 8 +- .../main/js/default/pages/progress/index.css | 2 +- .../main/js/default/pages/progress/index.hml | 2 +- .../main/js/default/pages/progress/index.js | 8 +- .../main/js/default/pages/rainbow/index.css | 2 +- .../main/js/default/pages/rainbow/index.hml | 44 +- .../main/js/default/pages/rainbow/index.js | 58 +- UI/chart/package.json | 6 +- ability/FormAbility/.gitignore | 8 + ability/FormAbility/README_zh.md | 2 +- .../entry/src/main/ets/FormAbility/form.ts | 252 +++---- .../entry/src/main/ets/model/Logger.ts | 38 +- .../src/main/js/widget/pages/index/index.hml | 18 +- ability/FormAbility/package.json | 6 +- ability/FormExtAbility/.gitignore | 8 + ability/FormExtAbility/README_zh.md | 2 +- .../src/main/ets/Application/AbilityStage.ts | 6 +- .../src/main/ets/FormAbility/FormAbility.ts | 270 +++---- .../src/main/ets/MainAbility/MainAbility.ts | 60 +- .../entry/src/main/ets/model/Logger.ts | 38 +- .../src/main/js/widget/pages/index/index.hml | 18 +- ability/FormExtAbility/package.json | 6 +- ability/FormLauncher/.gitignore | 8 + ability/FormLauncher/README_zh.md | 2 +- ability/FormLauncher/entry/package.json | 16 +- .../entry/src/main/ets/model/Logger.ts | 38 +- ability/FormLauncher/package.json | 22 +- ability/JsDistributedMusicPlayer/.gitignore | 8 + ability/JsDistributedMusicPlayer/README_zh.md | 2 +- .../entry/src/main/js/MainAbility/app.js | 12 +- .../main/js/MainAbility/model/KvStoreModel.js | 172 ++--- .../js/MainAbility/model/RemoteDeviceModel.js | 298 ++++---- .../main/js/MainAbility/pages/index/index.hml | 84 +-- .../main/js/MainAbility/pages/index/index.js | 660 +++++++++--------- common/AirQuality/.gitignore | 8 + common/AirQuality/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.css | 8 +- .../src/main/js/default/pages/index/index.hml | 208 +++--- .../src/main/js/default/pages/index/index.js | 150 ++-- .../main/js/default/pages/second/second.hml | 262 +++---- .../main/js/default/pages/second/second.js | 24 +- common/AirQuality/package.json | 6 +- common/Clock/.gitignore | 8 + common/Clock/README_zh.md | 2 +- common/Clock/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.hml | 20 +- .../src/main/js/default/pages/index/index.js | 54 +- common/Clock/package.json | 6 +- common/DistributeCalc/.gitignore | 8 + common/DistributeCalc/README_zh.md | 2 +- .../entry/src/main/js/MainAbility/app.js | 12 +- .../MainAbility/common/RemoteDeviceModel.js | 302 ++++---- .../main/js/MainAbility/common/calculator.js | 236 +++---- .../js/MainAbility/common/kvstoreModel.js | 145 ++-- .../main/js/MainAbility/pages/index/index.hml | 188 ++--- .../main/js/MainAbility/pages/index/index.js | 502 ++++++------- common/ECG/.gitignore | 8 + common/ECG/README_zh.md | 2 +- common/ECG/entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.css | 8 + .../src/main/js/default/pages/index/index.hml | 38 +- .../src/main/js/default/pages/index/index.js | 376 +++++----- common/ECG/package.json | 6 +- common/Flashlight/.gitignore | 8 + common/Flashlight/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/pages/index/index.hml | 10 +- .../src/main/js/default/pages/index/index.js | 75 +- common/Flashlight/package.json | 8 +- .../ets/MainAbility/common/lockSwitch.ets | 2 +- .../src/main/ets/MainAbility/pages/index.ets | 2 +- data/DDMQuery/.gitignore | 8 + data/DDMQuery/README_zh.md | 2 +- .../src/main/ets/MainAbility/pages/Index.ets | 3 +- data/DDMQuery/package.json | 6 +- device/Bluetooth/README_zh.md | 2 +- device/Browser/AppScope/app.json5 | 2 +- .../src/main/resources/rawfile/favicon.ico | Bin 4286 -> 0 bytes device/DeviceManager/.gitignore | 8 + device/DeviceManager/README_zh.md | 2 +- .../entry/src/main/ets/pages/Index.ets | 4 +- media/JsAudioPlayer/.gitignore | 8 + media/JsAudioPlayer/README_zh.md | 2 +- .../entry/src/main/js/default/app.js | 12 +- .../src/main/js/default/common/PlayerModel.js | 428 ++++++------ .../src/main/js/default/pages/index/index.hml | 72 +- .../src/main/js/default/pages/index/index.js | 178 ++--- media/JsAudioPlayer/package.json | 6 +- 293 files changed, 5591 insertions(+), 5168 deletions(-) create mode 100644 DFX/JsDotTest/.gitignore create mode 100644 FileManager/FileIo/.gitignore create mode 100644 MultiDeviceAppDev/AdaptiveCapabilities/.gitignore create mode 100644 MultiDeviceAppDev/JsAdaptiveCapabilities/.gitignore create mode 100644 UI/AtomicLayout/.gitignore create mode 100644 UI/Badge/.gitignore create mode 100644 UI/International/.gitignore create mode 100644 UI/JSComponments/.gitignore create mode 100644 UI/JsAdaptivePortalList/.gitignore create mode 100644 UI/JsAdaptivePortalPage/.gitignore create mode 100644 UI/JsAdaptiveServiceWidget/.gitignore create mode 100644 UI/JsAnimation/.gitignore create mode 100644 UI/JsAnimationStyle/.gitignore create mode 100644 UI/JsAnimator/.gitignore create mode 100644 UI/JsBasicComponents/.gitignore create mode 100644 UI/JsBrightness/.gitignore create mode 100644 UI/JsCanvas/.gitignore create mode 100644 UI/JsDevice/.gitignore create mode 100644 UI/JsDialog/.gitignore create mode 100644 UI/chart/.gitignore create mode 100644 ability/FormAbility/.gitignore create mode 100644 ability/FormExtAbility/.gitignore create mode 100644 ability/FormLauncher/.gitignore create mode 100644 ability/JsDistributedMusicPlayer/.gitignore create mode 100644 common/AirQuality/.gitignore create mode 100644 common/Clock/.gitignore create mode 100644 common/DistributeCalc/.gitignore create mode 100644 common/ECG/.gitignore create mode 100644 common/Flashlight/.gitignore create mode 100644 data/DDMQuery/.gitignore delete mode 100644 device/Browser/entry/src/main/resources/rawfile/favicon.ico create mode 100644 device/DeviceManager/.gitignore create mode 100644 media/JsAudioPlayer/.gitignore diff --git a/DFX/JsDotTest/.gitignore b/DFX/JsDotTest/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/DFX/JsDotTest/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/DFX/JsDotTest/README_zh.md b/DFX/JsDotTest/README_zh.md index b63a7108d..11fb27fd2 100644 --- a/DFX/JsDotTest/README_zh.md +++ b/DFX/JsDotTest/README_zh.md @@ -32,4 +32,4 @@ 2.性能打点验证只能通过上述命令获取日志来进行验证。 -3.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/DFX/JsDotTest/entry/src/main/js/MainAbility/pages/index/index.hml b/DFX/JsDotTest/entry/src/main/js/MainAbility/pages/index/index.hml index c30232738..d99877171 100644 --- a/DFX/JsDotTest/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/DFX/JsDotTest/entry/src/main/js/MainAbility/pages/index/index.hml @@ -14,14 +14,14 @@ -->
- {{ $t('strings.appName') }} - {{ this.Text }} -
- -
-
- {{ $t('strings.disable') }} - -
+ {{ $t('strings.appName') }} + {{ this.Text }} +
+ +
+
+ {{ $t('strings.disable') }} + +
diff --git a/DFX/JsDotTest/package.json b/DFX/JsDotTest/package.json index 890101f4d..511a79fe1 100644 --- a/DFX/JsDotTest/package.json +++ b/DFX/JsDotTest/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/FileManager/FileIo/.gitignore b/FileManager/FileIo/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/FileManager/FileIo/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/FileManager/FileIo/README_zh.md b/FileManager/FileIo/README_zh.md index 04425af9a..000ea8c45 100644 --- a/FileManager/FileIo/README_zh.md +++ b/FileManager/FileIo/README_zh.md @@ -30,4 +30,4 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/FileManager/FileIo/entry/src/main/ets/MainAbility/pages/Index.ets b/FileManager/FileIo/entry/src/main/ets/MainAbility/pages/Index.ets index 0faf3eadb..107df277e 100644 --- a/FileManager/FileIo/entry/src/main/ets/MainAbility/pages/Index.ets +++ b/FileManager/FileIo/entry/src/main/ets/MainAbility/pages/Index.ets @@ -39,7 +39,7 @@ struct Index { $r('app.string.read_fileIo'), $r('app.string.delete_fileIo') ] - private stream: fileIo.Stream + private stream: fileIo.Stream create_fileIo() { this.result = path + '/xxx.txt' diff --git a/MultiDeviceAppDev/AdaptiveCapabilities/.gitignore b/MultiDeviceAppDev/AdaptiveCapabilities/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/MultiDeviceAppDev/AdaptiveCapabilities/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/MultiDeviceAppDev/AdaptiveCapabilities/README_zh.md b/MultiDeviceAppDev/AdaptiveCapabilities/README_zh.md index 8d55bbac2..649f0f45f 100644 --- a/MultiDeviceAppDev/AdaptiveCapabilities/README_zh.md +++ b/MultiDeviceAppDev/AdaptiveCapabilities/README_zh.md @@ -32,6 +32,6 @@ 2.本示例为Stage模型,从API version 9开始支持。 -3.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 4.本示例着重介绍了一多的自适应布局能力,未引入断点能力,建议查看相关能力在IDE提供的MatePadPro预览器中运行和查看效果。 \ No newline at end of file diff --git a/MultiDeviceAppDev/AdaptiveCapabilities/package.json b/MultiDeviceAppDev/AdaptiveCapabilities/package.json index fcad2c1b2..5e5384cfd 100644 --- a/MultiDeviceAppDev/AdaptiveCapabilities/package.json +++ b/MultiDeviceAppDev/AdaptiveCapabilities/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/MultiDeviceAppDev/JsAdaptiveCapabilities/.gitignore b/MultiDeviceAppDev/JsAdaptiveCapabilities/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/MultiDeviceAppDev/JsAdaptiveCapabilities/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/MultiDeviceAppDev/JsAdaptiveCapabilities/README_zh.md b/MultiDeviceAppDev/JsAdaptiveCapabilities/README_zh.md index 5569177a6..4fb766f0c 100644 --- a/MultiDeviceAppDev/JsAdaptiveCapabilities/README_zh.md +++ b/MultiDeviceAppDev/JsAdaptiveCapabilities/README_zh.md @@ -36,6 +36,6 @@ 2.本示例为FA模型,从API version 8开始支持。 -3.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 4.本示例着重介绍了一多的自适应布局能力,未引入断点能力,建议查看相关能力在IDE提供的MatePadPro预览器中运行和查看效果。 \ No newline at end of file diff --git a/MultiDeviceAppDev/JsAdaptiveCapabilities/entry/package.json b/MultiDeviceAppDev/JsAdaptiveCapabilities/entry/package.json index 992c771b9..db08bbf9d 100644 --- a/MultiDeviceAppDev/JsAdaptiveCapabilities/entry/package.json +++ b/MultiDeviceAppDev/JsAdaptiveCapabilities/entry/package.json @@ -1,14 +1,14 @@ { - "license":"ISC", - "devDependencies":{}, - "name":"entry", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{} + "license": "ISC", + "devDependencies": {}, + "name": "entry", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": {} } \ No newline at end of file diff --git a/MultiDeviceAppDev/JsAdaptiveCapabilities/package.json b/MultiDeviceAppDev/JsAdaptiveCapabilities/package.json index 95bb76461..8a465e39e 100644 --- a/MultiDeviceAppDev/JsAdaptiveCapabilities/package.json +++ b/MultiDeviceAppDev/JsAdaptiveCapabilities/package.json @@ -1,18 +1,18 @@ { - "license":"ISC", - "devDependencies":{}, - "name":"jsadaptivecapabilities", - "ohos":{ - "org":"huawei", - "directoryLevel":"project", - "buildTool":"hvigor" + "license": "ISC", + "devDependencies": {}, + "name": "jsadaptivecapabilities", + "ohos": { + "org": "huawei", + "directoryLevel": "project", + "buildTool": "hvigor" }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{ - "@ohos/hypium":"1.0.1", - "@ohos/hvigor-ohos-plugin":"1.1.6", - "@ohos/hvigor":"1.1.6" + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": { + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/Network/UploadDownload/entry/package.json b/Network/UploadDownload/entry/package.json index 29732ffea..c7685ac4e 100644 --- a/Network/UploadDownload/entry/package.json +++ b/Network/UploadDownload/entry/package.json @@ -1,14 +1,14 @@ { - "license": "ISC", - "devDependencies": {}, - "name": "entry", - "ohos": { - "org": "huawei", - "directoryLevel": "module", - "buildTool": "hvigor" - }, - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": {} + "license": "ISC", + "devDependencies": {}, + "name": "entry", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": {} } diff --git a/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Index.ets b/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Index.ets index 5734a8b41..c3680b819 100644 --- a/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Index.ets +++ b/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Index.ets @@ -19,7 +19,6 @@ import resourceManager from '@ohos.resourceManager' import featureAbility from '@ohos.ability.featureAbility' import logger from '../model/Logger' import { TitleBar } from '../common/TitleBar' -import { UploadDownSource } from "../model/DataSource" const TAG: string = 'Index' @@ -29,8 +28,8 @@ struct Index { @State receivedSize: number = 0 @State totalSize: number = 0 @State message: string = '' - @State files: UploadDownSource = new UploadDownSource([]) - @State uploads: UploadDownSource = new UploadDownSource([]) + @State files: Array = [] + @State uploads: Array = [] private downloadConfig = { url: '', filePath: '' @@ -65,10 +64,10 @@ struct Index { let splitFiles = tempFiles[i].split('//')[1].split('/') logger.info(TAG, `splitFiles = ${JSON.stringify(splitFiles)}`) if (splitFiles.indexOf('upload') === -1) { - this.files.pushData(tempFiles[i]) + this.files.push(tempFiles[i]) } } - logger.info(TAG, `files = ${JSON.stringify(this.files['uploadDownData'])}`) + logger.info(TAG, `files = ${JSON.stringify(this.files)}`) } else { logger.info(TAG, `error: ${JSON.stringify(err)}`) httpRequest.destroy() @@ -85,7 +84,7 @@ struct Index { .fontSize(25) .alignSelf(ItemAlign.Start) .margin({ top: 20, left: 10 }) - LazyForEach(this.files, (item, index) => { + ForEach(this.files, (item, index) => { Divider() .margin({ top: 20 }) Row() { @@ -121,11 +120,8 @@ struct Index { }) downloadTask.on('complete', async () => { - await this.files['uploadDownData'].splice(index, 1) - await this.files.notifyDataReload() - await this.uploads['uploadDownData'].push(item) - await this.uploads.notifyDataReload() - + await this.files.splice(index, 1) + await this.uploads.push(item) AlertDialog.show({ message: `${item}${downloadSuccess}`, confirm: { @@ -161,7 +157,7 @@ struct Index { } .width('100%') - if (index === this.files['uploadDownData'].length - 1) { + if (index === this.files.length - 1) { Divider() .margin({ top: 20 }) } @@ -182,7 +178,7 @@ struct Index { } .constraintSize({ maxHeight: '87%' }) - if (this.receivedSize !== 0 && this.totalSize !== 0 && this.files['uploadDownData'].length > 0) { + if (this.receivedSize !== 0 && this.totalSize !== 0 && this.files.length > 0) { Row() { Text($r('app.string.download_progress')) .fontSize(25) diff --git a/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Upload.ets b/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Upload.ets index 80bc2f5e7..90cbf8277 100644 --- a/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Upload.ets +++ b/Network/UploadDownload/entry/src/main/ets/MainAbility/pages/Upload.ets @@ -17,9 +17,8 @@ import request from '@ohos.request' import logger from '../model/Logger' import { TitleBar } from '../common/TitleBar' import { UploadFile } from '../model/UploadFile' -import { UploadConfigs } from '../model/UploadConfigs' +import { UploadConfigs } from '../model/UploadConfigs' import { UploadRequestData } from '../model/UploadRequestData' -import { UploadDownSource } from "../model/DataSource" const TAG: string = 'Upload' @@ -30,7 +29,7 @@ struct Upload { private uploadConfig: UploadConfigs = new UploadConfigs() @State uploadedSize: number = 0 @State totalSize: number = 0 - @State uploads: UploadDownSource = router.getParams()['uploads'] + @State uploads: Array = router.getParams()['uploads'] @State isDialog: boolean = false @State selectIndex: number = -1 handlerClickButton = () => { @@ -46,7 +45,7 @@ struct Upload { .fontSize(25) .alignSelf(ItemAlign.Start) .margin({ top: 20, left: 10 }) - LazyForEach(this.uploads, (item, index) => { + ForEach(this.uploads, (item, index) => { Divider() .margin({ top: 20 }) Row() { @@ -121,7 +120,7 @@ struct Upload { .width('100%') .margin({ top: 10, left: 10 }) - if (index === this.uploads['uploadDownData'].length - 1) { + if (index === this.uploads.length - 1) { Divider() .margin({ top: 20 }) } @@ -131,7 +130,7 @@ struct Upload { } .constraintSize({ maxHeight: '87%' }) - if (this.uploadedSize !== 0 && this.totalSize !== 0 && this.uploads['uploadDownData'].length > 0) { + if (this.uploadedSize !== 0 && this.totalSize !== 0 && this.uploads.length > 0) { Row() { Text($r('app.string.upload_progress')) .fontSize(25) diff --git a/Network/UploadDownload/package.json b/Network/UploadDownload/package.json index 7f69c1ec1..b8ef18e85 100644 --- a/Network/UploadDownload/package.json +++ b/Network/UploadDownload/package.json @@ -1,19 +1,19 @@ { - "license": "ISC", - "devDependencies": {}, - "name": "uploaddownload", - "ohos": { - "org": "huawei", - "directoryLevel": "project", - "buildTool": "hvigor" - }, - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": { - "@ohos/hvigor-ohos-plugin": "1.1.6", - "hypium": "^1.0.0", - "@ohos/hvigor": "1.1.6", - "@ohos/hypium": "1.0.1" - } -} + "license":"ISC", + "devDependencies":{}, + "name":"uploaddownload", + "ohos":{ + "org":"huawei", + "directoryLevel":"project", + "buildTool":"hvigor" + }, + "description":"example description", + "repository":{}, + "version":"1.0.0", + "dependencies":{ + "@ohos/hypium":"1.0.1", + "@ohos/hvigor-ohos-plugin":"1.1.6", + "hypium":"^1.0.0", + "@ohos/hvigor":"1.1.6" + } +} \ No newline at end of file diff --git a/Notification/CommonEvent/entry/src/main/ets/MainAbility/pages/index.ets b/Notification/CommonEvent/entry/src/main/ets/MainAbility/pages/index.ets index e21e886ff..9a0fccfc2 100644 --- a/Notification/CommonEvent/entry/src/main/ets/MainAbility/pages/index.ets +++ b/Notification/CommonEvent/entry/src/main/ets/MainAbility/pages/index.ets @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {PublishEventView} from '../common/publishEvent' -import {SubscribeEventView} from '../common/subscribeEvent' +import { PublishEventView } from '../common/publishEvent' +import { SubscribeEventView } from '../common/subscribeEvent' @Entry @Component @@ -36,7 +36,7 @@ struct Index { Line() .width("100%").height(2) .backgroundColor("#D5D5D5") - .margin({ top: 15}) + .margin({ top: 15 }) PublishEventView() diff --git a/Preset/DistributedMusicPlayer/entry/src/main/ets/pages/Index.ets b/Preset/DistributedMusicPlayer/entry/src/main/ets/pages/Index.ets index 61b90a855..f697bd104 100644 --- a/Preset/DistributedMusicPlayer/entry/src/main/ets/pages/Index.ets +++ b/Preset/DistributedMusicPlayer/entry/src/main/ets/pages/Index.ets @@ -203,13 +203,24 @@ struct Index { } getShownTimer(ms) { - let seconds = Math.floor(ms / ONE_THOUSAND) - let sec = seconds % SIXTY let minStr: string let secStr: string + let seconds = Math.floor(ms / ONE_THOUSAND) + let sec = seconds % SIXTY + Logger.info(TAG, `getShownTimer sec = ${sec}`) let min = (seconds - sec) / SIXTY - sec < 10 ? secStr = '0' + sec : '' + sec - min < 10 ? minStr = '0' + min : '' + min + Logger.info(TAG, `getShownTimer min = ${min}`) + if (sec < 10) { + secStr = '0' + sec + } else { + secStr = sec.toString(10) + } + if (min < 10) { + minStr = '0' + min + } else { + minStr = min.toString(10) + } + Logger.warn(TAG, `getShownTimer = ${minStr}:${secStr}`) return minStr + ':' + secStr } @@ -287,7 +298,7 @@ struct Index { PlayerModel.pause() this.imageArrays[2] = $r('app.media.ic_play') } else { - PlayerModel.preLoad(0, () => { + PlayerModel.preLoad(PlayerModel.index, () => { PlayerModel.play(-1, true) this.imageArrays[2] = $r('app.media.ic_pause') }) diff --git a/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/MainAbility/pages/Index.ets b/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/MainAbility/pages/Index.ets index c6a77d567..b55969d04 100644 --- a/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/MainAbility/pages/Index.ets +++ b/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/MainAbility/pages/Index.ets @@ -39,18 +39,18 @@ struct Index { Image($r('app.media.file')) .width('100%') .height('30%') - .margin({top:30}) + .margin({ top: 30 }) .objectFit(ImageFit.Contain) Text($r('app.string.fileName')) .fontSize(30) Button() { Text($r('app.string.download')) - .fontSize(20) + .fontSize(20) } .margin({ top: 60 }) .type(ButtonType.Capsule) .backgroundColor('#0D9FFB') - .size({width:'60%'}) + .size({ width: '60%' }) .onClick(() => { Logger.info(TAG, 'ServiceAbility Start') startServiceAbility() diff --git a/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/ServiceAbility/service.ts b/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/ServiceAbility/service.ts index 6598759f1..df9c3d6c1 100644 --- a/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/ServiceAbility/service.ts +++ b/ResourcesSchedule/BackgroundTaskManager/entry/src/main/ets/ServiceAbility/service.ts @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2022 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. + */ + import wantAgent from '@ohos.wantAgent' import backgroundTaskManager from '@ohos.backgroundTaskManager' import featureAbility from '@ohos.ability.featureAbility' @@ -9,67 +24,67 @@ let num: number = 0 let timerID: number = 0 let notificationRequest = { - content: { - contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, - normal: { - title: '文件名', - text: '' - } - }, - id: 1 + content: { + contentType: Notification.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, + normal: { + title: '文件名', + text: '' + } + }, + id: 1 } function callback(err, data) { - if (err) { - Logger.error(TAG, `Operation failed Cause: ${err}`) - return - } - if (timerID !== 0) { - clearInterval(timerID) + if (err) { + Logger.error(TAG, `Operation failed Cause: ${err}`) + return + } + if (timerID !== 0) { + clearInterval(timerID) + } + Logger.info(TAG, `Operation startBackgroundRunning succeeded`) + timerID = setInterval(() => { + notificationRequest.content.normal.text = `${num}%` + Notification.publish(notificationRequest).then(() => { + Logger.info(TAG, `==========================>publishCallback=======================>`); + }) + num += 5 + if (num > 20) { + clearInterval(timerID) } - Logger.info(TAG, `Operation startBackgroundRunning succeeded`) - timerID = setInterval(() => { - notificationRequest.content.normal.text = `${num}%` - Notification.publish(notificationRequest).then(() => { - Logger.info(TAG, `==========================>publishCallback=======================>`); - }) - num += 5 - if (num > 20) { - clearInterval(timerID) - } - }, 5000) + }, 5000) } function startContinuousTask() { - Logger.info(TAG, `startBackground use new api`) - let wantAgentInfo = { - wants: [ - { - bundleName: "ohos.samples.backgroundtaskmanager", - abilityName: "ohos.samples.backgroundtaskmanager.MainAbility" - } - ], - operationType: wantAgent.OperationType.START_ABILITIES, - requestCode: 0, - wantAgentFlags: [wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG] - }; + Logger.info(TAG, `startBackground use new api`) + let wantAgentInfo = { + wants: [ + { + bundleName: "ohos.samples.backgroundtaskmanager", + abilityName: "ohos.samples.backgroundtaskmanager.MainAbility" + } + ], + operationType: wantAgent.OperationType.START_ABILITIES, + requestCode: 0, + wantAgentFlags: [wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG] + }; - wantAgent.getWantAgent(wantAgentInfo).then((data) => { - Logger.info(TAG, `startBackground begin`) - backgroundTaskManager.startBackgroundRunning(featureAbility.getContext(), backgroundTaskManager.BackgroundMode.DATA_TRANSFER, data, callback) - }) + wantAgent.getWantAgent(wantAgentInfo).then((data) => { + Logger.info(TAG, `startBackground begin`) + backgroundTaskManager.startBackgroundRunning(featureAbility.getContext(), backgroundTaskManager.BackgroundMode.DATA_TRANSFER, data, callback) + }) } export default { - onStart() { - Logger.info(TAG, 'ServiceAbility onStart') - startContinuousTask() - }, - onStop() { - Logger.info(TAG, 'ServiceAbility onStop') - backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()) - }, - onCommand(want, startId) { - Logger.info(TAG, 'ServiceAbility onCommand') - } + onStart() { + Logger.info(TAG, 'ServiceAbility onStart') + startContinuousTask() + }, + onStop() { + Logger.info(TAG, 'ServiceAbility onStop') + backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()) + }, + onCommand(want, startId) { + Logger.info(TAG, 'ServiceAbility onCommand') + } } \ No newline at end of file diff --git a/Telephony/Contact/entry/src/main/ets/MainAbility/component/ContactInfo.ets b/Telephony/Contact/entry/src/main/ets/MainAbility/component/ContactInfo.ets index 881d481f0..9bf188916 100644 --- a/Telephony/Contact/entry/src/main/ets/MainAbility/component/ContactInfo.ets +++ b/Telephony/Contact/entry/src/main/ets/MainAbility/component/ContactInfo.ets @@ -15,6 +15,7 @@ import router from '@ohos.router' import contact from '@ohos.contact' +import resourceManager from '@ohos.resourceManager'; import Logger from '../data/Logger' const TAG: string = 'ContactInfo' @@ -22,9 +23,9 @@ const TAG: string = 'ContactInfo' @Preview @Component export struct ContactInfo { - @State phone: string | Resource = '' - @State email: string | Resource = '' - @State address: string | Resource = '' + @State phone: string = '' + @State email: string = '' + @State address: string = '' private contact: contact.Contact build() { @@ -185,17 +186,29 @@ export struct ContactInfo { try { this.phone = this.contact.phoneNumbers[0].phoneNumber } catch (err) { - this.phone = $r('app.string.not_fill') + resourceManager.getResourceManager((error, msg) => { + msg.getString($r('app.string.not_fill').id).then(value => { + this.phone = value + }) + }) } try { this.email = this.contact.emails[0].email } catch (err) { - this.email = $r('app.string.not_fill') + resourceManager.getResourceManager((error, msg) => { + msg.getString($r('app.string.not_fill').id).then(value => { + this.email = value + }) + }) } try { this.address = this.contact.postalAddresses[0].postalAddress } catch (err) { - this.address = $r('app.string.not_fill') + resourceManager.getResourceManager((error, msg) => { + msg.getString($r('app.string.not_fill').id).then(value => { + this.address = value + }) + }) } } } \ No newline at end of file diff --git a/Telephony/MobileNetwork/entry/src/main/ets/Application/AbilityStage.ts b/Telephony/MobileNetwork/entry/src/main/ets/Application/AbilityStage.ts index 809ccc5ab..6e24bab18 100644 --- a/Telephony/MobileNetwork/entry/src/main/ets/Application/AbilityStage.ts +++ b/Telephony/MobileNetwork/entry/src/main/ets/Application/AbilityStage.ts @@ -19,7 +19,7 @@ import AbilityStage from '@ohos.application.AbilityStage' const TAG: string = '[AbilityStage]' export default class MyAbilityStage extends AbilityStage { - onCreate() { - Logger.info(TAG, `[Demo] MyAbilityStage onCreate`) - } + onCreate() { + Logger.info(TAG, `[Demo] MyAbilityStage onCreate`) + } } \ No newline at end of file diff --git a/Telephony/MobileNetwork/entry/src/main/ets/MainAbility/MainAbility.ts b/Telephony/MobileNetwork/entry/src/main/ets/MainAbility/MainAbility.ts index f2aafcbe8..5966390b7 100644 --- a/Telephony/MobileNetwork/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/Telephony/MobileNetwork/entry/src/main/ets/MainAbility/MainAbility.ts @@ -16,38 +16,38 @@ import Logger from '../model/Logger' import Ability from '@ohos.application.Ability' -const TAG: string = '[MainAbility]' +const TAG:string = '[MainAbility]' export default class MainAbility extends Ability { - onCreate(want, launchParam) { - Logger.info(TAG, `[Demo] MainAbility onCreate`) - globalThis.abilityWant = want - globalThis.context = this.context - } - - onDestroy() { - Logger.info(TAG, `[Demo] MainAbility onDestroy`) - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - Logger.info(TAG, `[Demo] MainAbility onWindowStageCreate`) - - windowStage.setUIContent(this.context, 'pages/Index', null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - Logger.info(TAG, `[Demo] MainAbility onWindowStageDestroy`) - } - - onForeground() { - // Ability has brought to foreground - Logger.info(TAG, `[Demo] MainAbility onForeground`) - } - - onBackground() { - // Ability has back to background - Logger.info(TAG, `[Demo] MainAbility onBackground`) - } + onCreate(want, launchParam) { + Logger.info(TAG, `[Demo] MainAbility onCreate`) + globalThis.abilityWant = want + globalThis.context = this.context + } + + onDestroy() { + Logger.info(TAG, `[Demo] MainAbility onDestroy`) + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + Logger.info(TAG, `[Demo] MainAbility onWindowStageCreate`) + + windowStage.setUIContent(this.context, 'pages/Index', null) + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + Logger.info(TAG, `[Demo] MainAbility onWindowStageDestroy`) + } + + onForeground() { + // Ability has brought to foreground + Logger.info(TAG, `[Demo] MainAbility onForeground`) + } + + onBackground() { + // Ability has back to background + Logger.info(TAG, `[Demo] MainAbility onBackground`) + } }; diff --git a/Telephony/MobileNetwork/entry/src/main/ets/model/Logger.ts b/Telephony/MobileNetwork/entry/src/main/ets/model/Logger.ts index 554025733..c00b8013e 100644 --- a/Telephony/MobileNetwork/entry/src/main/ets/model/Logger.ts +++ b/Telephony/MobileNetwork/entry/src/main/ets/model/Logger.ts @@ -16,34 +16,34 @@ import hilog from '@ohos.hilog' export class Logger { - private domain: number - private prefix: string - private format: string = `%{public}s, %{public}s` - - constructor(prefix: string) { - this.prefix = prefix - this.domain = 0xFF00 - } - - debug(...args: any[]) { - hilog.debug(this.domain, this.prefix, this.format, args) - } - - info(...args: any[]) { - hilog.info(this.domain, this.prefix, this.format, args) - } - - warn(...args: any[]) { - hilog.warn(this.domain, this.prefix, this.format, args) - } - - error(...args: any[]) { - hilog.error(this.domain, this.prefix, this.format, args) - } - - fatal(...args: any[]) { - hilog.fatal(this.domain, this.prefix, this.format, args) - } + private domain: number + private prefix: string + private format: string = `%{public}s, %{public}s` + + constructor(prefix: string) { + this.prefix = prefix + this.domain = 0xFF00 + } + + debug(...args: any[]) { + hilog.debug(this.domain, this.prefix, this.format, args) + } + + info(...args: any[]) { + hilog.info(this.domain, this.prefix, this.format, args) + } + + warn(...args: any[]) { + hilog.warn(this.domain, this.prefix, this.format, args) + } + + error(...args: any[]) { + hilog.error(this.domain, this.prefix, this.format, args) + } + + fatal(...args: any[]) { + hilog.fatal(this.domain, this.prefix, this.format, args) + } } export default new Logger('[MobileNetwork]') \ No newline at end of file diff --git a/Telephony/MobileNetwork/package.json b/Telephony/MobileNetwork/package.json index 504228df6..a3510f0cd 100644 --- a/Telephony/MobileNetwork/package.json +++ b/Telephony/MobileNetwork/package.json @@ -1,18 +1,18 @@ { - "license": "ISC", - "devDependencies": {}, - "name": "mobilenetwork", - "ohos": { - "org": "huawei", - "directoryLevel": "project", - "buildTool": "hvigor" + "license":"ISC", + "devDependencies":{}, + "name":"mobilenetwork", + "ohos":{ + "org":"huawei", + "directoryLevel":"project", + "buildTool":"hvigor" }, - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": { - "@ohos/hypium": "1.0.1", - "@ohos/hvigor-ohos-plugin": "1.1.6", - "@ohos/hvigor": "1.1.6" + "description":"example description", + "repository":{}, + "version":"1.0.0", + "dependencies":{ + "@ohos/hypium":"1.0.1", + "@ohos/hvigor-ohos-plugin":"1.1.6", + "@ohos/hvigor":"1.1.6" } -} +} \ No newline at end of file diff --git a/Telephony/MobileNetwork/screenshots/device/index.png b/Telephony/MobileNetwork/screenshots/device/index.png index 1b26b62b4c5ce4c53ec8ab6cd59b00b7c8da39d2..00220fb2afdb5a5d2197bc3aa41e8ede7b26ba7b 100644 GIT binary patch literal 26922 zcmeFYXE>Yj-~V0J(pF1bElNU%RkL=8(H2cnR8iC_DXM0ym{CRTMD5yYZ>ha&#@<`4 z#1;u+&pZ9yPp;#>@8f!KAJ_lc^&lKMapuhT`}w@zulFaXptov}TQ`_*T)K4WmeOm5 zcb6_v(2^hX*Qm%xv@U#g$loX&-$7npD(VBQk)K?#c%k~@(j_#C=G5dW`T2GG*LseZ zF44CBdr(C4(z0B-^tn+<;f0o~(Plk$s-brDMI(XNlHKp^W7Y84J6AP=Z{5yi7|?j} z_I5#z?-CskH&oHOBj;vt>SYEh$ekqra&A}b*+nMh>*h?rZq^Q?Ic!0cUE<-Dn<#{5-zBgF&tvY4PV--X0Yj z*}TAB&_LxGC8dz4H2ch1#5>8%+OX7bG3j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ztergEhgD4;AoOq z*Qba#k;tFQp`-y|9zmz5WmfZCNPCpXgv~>Wk>6ByLB9p5hXqh}Hb`kwl5$*sob4|)*8@cb+8``{{c#RoJR|yw z7`twR9R69H75c+qyh&6EVX;r=G8-!)-}3B+N_|G4$mF&Zy$1pRc^V;}BRw8}E6a{Y zB*WjXLE_CtS{G&02jqO{?ItUZ)pRNlX2F+O3$u1z>2`R?$Uv&!i|OthHx-aVyY!AV z9j<**`h0sf!6$W!c^%?wmyawurcwptQb^Q+u@v7Y)gZGyd4tt{-YX zcqect)L%xep-t9|-s{%AAYP|J!p8DP<5@C0S~e0+aYT(6xdDccW5`X4KofX*{>ni;{!#HxF+w?GhVn+N-QfPBM@;|nceed6 zumJv}A^Wdr8vLiCcweDN-ZbF90e*-;NB{r; diff --git a/UI/AtomicLayout/.gitignore b/UI/AtomicLayout/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/AtomicLayout/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/AtomicLayout/README_zh.md b/UI/AtomicLayout/README_zh.md index 7af3f3186..f5bac2ed1 100644 --- a/UI/AtomicLayout/README_zh.md +++ b/UI/AtomicLayout/README_zh.md @@ -32,4 +32,4 @@ 2.本示例支持在标准系统使用。 -3.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/app.js b/UI/AtomicLayout/entry/src/main/js/default/app.js index 8e47afff1..50007322f 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/app.js +++ b/UI/AtomicLayout/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.hml b/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.hml index 43cea8b30..ec243cb0b 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.hml +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.hml @@ -14,11 +14,11 @@ -->

-
- A -
-
- - -
+
+ A +
+
+ + +
\ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.js b/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.js index e6fc0affd..aa1e7d3cc 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.js +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/fixed/index.js @@ -14,16 +14,16 @@ */ export default { - data: { - "height": "300px", - "width": "300px" - }, - onClickReturn() { - this.height = "300px" - this.width = "300px" - }, - onClickRefresh() { - this.height = "100px" - this.width = "200px" - } + data: { + "height": "300px", + "width": "300px" + }, + onClickReturn() { + this.height = "300px" + this.width = "300px" + }, + onClickRefresh() { + this.height = "100px" + this.width = "200px" + } } \ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.hml b/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.hml index 7bb8007b8..7a4c0937f 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.hml +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.hml @@ -14,13 +14,13 @@ -->
-
- A - B - C -
-
- - -
+
+ A + B + C +
+
+ + +
\ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.js b/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.js index 6b22dfdbd..e4afa5705 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.js +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/hide/index.js @@ -14,13 +14,13 @@ */ export default { - data: { - height: "200px", - }, - onClickReturn() { - this.height = "200px" - }, - onClickRefresh() { - this.height = "500px" - } + data: { + height: "200px", + }, + onClickReturn() { + this.height = "200px" + }, + onClickRefresh() { + this.height = "500px" + } } \ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.hml b/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.hml index a9aeeee80..260cfc5b9 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.hml +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.hml @@ -14,7 +14,7 @@ -->
- - - + + +
\ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.js b/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.js index 98965c67f..05cdbf2d3 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.js +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/index/index.js @@ -16,10 +16,10 @@ import router from '@ohos.router'; export default { - data: {}, - onchange(type) { - router.push({ - url: 'pages/' + type + '/index' - }) - } + data: {}, + onchange(type) { + router.push({ + url: 'pages/' + type + '/index' + }) + } } diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.hml b/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.hml index 7bb8007b8..7a4c0937f 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.hml +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.hml @@ -14,13 +14,13 @@ -->
-
- A - B - C -
-
- - -
+
+ A + B + C +
+
+ + +
\ No newline at end of file diff --git a/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.js b/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.js index 6b22dfdbd..e4afa5705 100644 --- a/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.js +++ b/UI/AtomicLayout/entry/src/main/js/default/pages/percentage/index.js @@ -14,13 +14,13 @@ */ export default { - data: { - height: "200px", - }, - onClickReturn() { - this.height = "200px" - }, - onClickRefresh() { - this.height = "500px" - } + data: { + height: "200px", + }, + onClickReturn() { + this.height = "200px" + }, + onClickRefresh() { + this.height = "500px" + } } \ No newline at end of file diff --git a/UI/AtomicLayout/package.json b/UI/AtomicLayout/package.json index 3c6c841a5..e8b4f8ec9 100644 --- a/UI/AtomicLayout/package.json +++ b/UI/AtomicLayout/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/Badge/.gitignore b/UI/Badge/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/Badge/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/Badge/README_zh.md b/UI/Badge/README_zh.md index 85e1aab15..3a001151a 100644 --- a/UI/Badge/README_zh.md +++ b/UI/Badge/README_zh.md @@ -26,4 +26,4 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 diff --git a/UI/Badge/entry/src/main/js/default/app.js b/UI/Badge/entry/src/main/js/default/app.js index 8e47afff1..50007322f 100644 --- a/UI/Badge/entry/src/main/js/default/app.js +++ b/UI/Badge/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/Badge/entry/src/main/js/default/pages/index/index.css b/UI/Badge/entry/src/main/js/default/pages/index/index.css index 55c4e304a..69707d450 100644 --- a/UI/Badge/entry/src/main/js/default/pages/index/index.css +++ b/UI/Badge/entry/src/main/js/default/pages/index/index.css @@ -82,6 +82,7 @@ height: 100%; justify-content: center; } + .container { width: 35%; height: 100%; @@ -91,6 +92,7 @@ margin-right: 12px; margin-left: 12px; } + .item { height: 50px; width: 100%; @@ -99,6 +101,7 @@ margin-bottom: 2px; background-color: white; } + .badge { position: absolute; height: 100%; diff --git a/UI/Badge/entry/src/main/js/default/pages/index/index.hml b/UI/Badge/entry/src/main/js/default/pages/index/index.hml index 98a3c1462..470dca45b 100644 --- a/UI/Badge/entry/src/main/js/default/pages/index/index.hml +++ b/UI/Badge/entry/src/main/js/default/pages/index/index.hml @@ -13,18 +13,18 @@ limitations under the License. -->
-
-
- -
- {{ $item.contacts }} - {{ $item.message }} -
- - - -
+
+
+ +
+ {{ $item.contacts }} + {{ $item.message }} +
+ + +
+
\ No newline at end of file diff --git a/UI/Badge/entry/src/main/js/default/pages/index/index.js b/UI/Badge/entry/src/main/js/default/pages/index/index.js index 10257b51b..215768b01 100644 --- a/UI/Badge/entry/src/main/js/default/pages/index/index.js +++ b/UI/Badge/entry/src/main/js/default/pages/index/index.js @@ -14,49 +14,49 @@ */ export default { - data: { - array: [ - { - imgPath: '/common/images/Image1.jpg', - contacts: "", - message: "", - visibility: "", - count: "", - maxCount: "" - }, - { - imgPath: '/common/images/Image2.jpg', - contacts: '', - message: '', - visibility: "", - count: "100", - maxCount: "99" - }, - { - imgPath: '/common/images/Image3.jpg', - contacts: '', - message: '', - visibility: "", - count: "35", - maxCount: "99" - } - ], - badgeConfig: { - badgeColor: "#FFFF0F0F", - textColor: "#ffffff", - } - }, - onInit() { - for (var arr in this.array) { - this.array[arr].contacts = this.$t('strings.contacts'); - this.array[arr].message = this.$t('strings.message'); - this.array[arr].visibility = "visible" - } - }, - badgeInvalidation(id) { - var idx = JSON.stringify(id) - console.log(idx) - this.array[idx].visibility = "hidden"; - console.log(this.array[idx].visibility) + data: { + array: [ + { + imgPath: '/common/images/Image1.jpg', + contacts: "", + message: "", + visibility: "", + count: "", + maxCount: "" + }, + { + imgPath: '/common/images/Image2.jpg', + contacts: '', + message: '', + visibility: "", + count: "100", + maxCount: "99" + }, + { + imgPath: '/common/images/Image3.jpg', + contacts: '', + message: '', + visibility: "", + count: "35", + maxCount: "99" + } + ], + badgeConfig: { + badgeColor: "#FFFF0F0F", + textColor: "#ffffff", } + }, + onInit() { + for (var arr in this.array) { + this.array[arr].contacts = this.$t('strings.contacts'); + this.array[arr].message = this.$t('strings.message'); + this.array[arr].visibility = "visible" + } + }, + badgeInvalidation(id) { + var idx = JSON.stringify(id) + console.log(idx) + this.array[idx].visibility = "hidden"; + console.log(this.array[idx].visibility) + } } \ No newline at end of file diff --git a/UI/Badge/package.json b/UI/Badge/package.json index 43ec0e1dd..137ee4c65 100644 --- a/UI/Badge/package.json +++ b/UI/Badge/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/UI/International/.gitignore b/UI/International/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/International/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/International/README_zh.md b/UI/International/README_zh.md index df51a5854..61d98b67b 100644 --- a/UI/International/README_zh.md +++ b/UI/International/README_zh.md @@ -30,4 +30,4 @@ TextClock:TextClock组件通过文本将当前系统时间显示在设备上 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/International/entry/src/main/js/default/app.js b/UI/International/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/UI/International/entry/src/main/js/default/app.js +++ b/UI/International/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/UI/International/entry/src/main/js/default/i18n/zh-CN.json b/UI/International/entry/src/main/js/default/i18n/zh-CN.json index 92e779de8..a63cd6b66 100644 --- a/UI/International/entry/src/main/js/default/i18n/zh-CN.json +++ b/UI/International/entry/src/main/js/default/i18n/zh-CN.json @@ -5,5 +5,4 @@ "cn": "中文国际化", "ja": "日文国际化" } - } \ No newline at end of file diff --git a/UI/International/entry/src/main/js/default/pages/index/index.hml b/UI/International/entry/src/main/js/default/pages/index/index.hml index 7b3479ba8..291e84cd3 100644 --- a/UI/International/entry/src/main/js/default/pages/index/index.hml +++ b/UI/International/entry/src/main/js/default/pages/index/index.hml @@ -14,12 +14,12 @@ -->
- - {{ dateTime }} - - {{ result1 }} - - {{ result }} - - {{ result2 }} + + {{ dateTime }} + + {{ result1 }} + + {{ result }} + + {{ result2 }}
diff --git a/UI/International/entry/src/main/js/default/pages/index/index.js b/UI/International/entry/src/main/js/default/pages/index/index.js index a1fd3dd03..fb383b186 100644 --- a/UI/International/entry/src/main/js/default/pages/index/index.js +++ b/UI/International/entry/src/main/js/default/pages/index/index.js @@ -16,31 +16,31 @@ import Intl from '@ohos.intl'; export default { - data: { - result: '', - result1: '', - result2: '', - dataDate: null, - dateTime: '' - }, - onInit() { - var datet = new Date() - this.dateTime = datet.getFullYear() + '-' + (datet.getMonth() + 1) + '-' + datet.getDate() - this.dataDate = new Date(datet.getFullYear(), datet.getMonth(), datet.getDate(), datet.getHours(), - datet.getMinutes(), datet.getSeconds()) - }, - cn() { - var dateFmt = new Intl.DateTimeFormat('zh-CN') - this.result = dateFmt.format(this.dataDate) - }, - en() { - var dateFmt1 = new Intl.DateTimeFormat('en-GB') - this.result1 = dateFmt1.format(this.dataDate) - }, - ja() { - var dateFmt2 = new Intl.DateTimeFormat('ja-JP') - this.result2 = dateFmt2.format(this.dataDate) - } + data: { + result: '', + result1: '', + result2: '', + dataDate: null, + dateTime: '' + }, + onInit() { + var datet = new Date() + this.dateTime = datet.getFullYear() + '-' + (datet.getMonth() + 1) + '-' + datet.getDate() + this.dataDate = new Date(datet.getFullYear(), datet.getMonth(), datet.getDate(), datet.getHours(), + datet.getMinutes(), datet.getSeconds()) + }, + cn() { + var dateFmt = new Intl.DateTimeFormat('zh-CN') + this.result = dateFmt.format(this.dataDate) + }, + en() { + var dateFmt1 = new Intl.DateTimeFormat('en-GB') + this.result1 = dateFmt1.format(this.dataDate) + }, + ja() { + var dateFmt2 = new Intl.DateTimeFormat('ja-JP') + this.result2 = dateFmt2.format(this.dataDate) + } } diff --git a/UI/International/package.json b/UI/International/package.json index 6f0716b89..43d0b1222 100644 --- a/UI/International/package.json +++ b/UI/International/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/JSComponments/.gitignore b/UI/JSComponments/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JSComponments/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JSComponments/README_zh.md b/UI/JSComponments/README_zh.md index c4391798d..d4285568d 100644 --- a/UI/JSComponments/README_zh.md +++ b/UI/JSComponments/README_zh.md @@ -22,4 +22,4 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/app.js b/UI/JSComponments/entry/src/main/js/MainAbility/app.js index 8e47afff1..50007322f 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/app.js +++ b/UI/JSComponments/entry/src/main/js/MainAbility/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.hml b/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.hml index d8ee5b997..6048bb3ef 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.hml +++ b/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.hml @@ -14,12 +14,12 @@ -->
- {{ title }} - - - Click here to view hidden text - - - hello worldshow - + {{ title }} + + + Click here to view hidden text + + + hello worldshow +
\ No newline at end of file diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.js b/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.js index 65c31d2eb..4893d9c07 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.js +++ b/UI/JSComponments/entry/src/main/js/MainAbility/pages/comp/comp.js @@ -14,21 +14,21 @@ */ export default { - props: { - title: { - default: 'title', - }, - showObject: {}, - }, - data() { - return { - display: this.showObject, - }; - }, - childClicked() { - this.$emit('eventType1', { - text: 'Get Child Component Parameter' - }); - this.show = !this.show; + props: { + title: { + default: 'title', }, + showObject: {}, + }, + data() { + return { + display: this.showObject, + }; + }, + childClicked() { + this.$emit('eventType1', { + text: 'Get Child Component Parameter' + }); + this.show = !this.show; + }, } \ No newline at end of file diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.hml b/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.hml index ddd539162..82a8844f4 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.hml +++ b/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.hml @@ -14,8 +14,8 @@ -->
- - This is the detail page. - - + + This is the detail page. + +
\ No newline at end of file diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.js b/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.js index ecec2055b..c0261a409 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.js +++ b/UI/JSComponments/entry/src/main/js/MainAbility/pages/details/details.js @@ -16,10 +16,10 @@ import router from '@ohos.router'; export default { - data: { - title: 'World' - }, - launch: function () { - router.back(); - } + data: { + title: 'World' + }, + launch: function () { + router.back(); + } } diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.hml b/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.hml index 510a9d395..5ac80210c 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.hml @@ -15,206 +15,206 @@ - -
- - Case 1:Build Layout + +
+ + Case 1:Build Layout + +
+
+ +
+
+ {{ headTitle }} + + {{ paragraphFirst }} + + {{ paragraphSecond }} + + + Comment + +
+ + + Done + +
+
+ {{ inputValue }} + + + Delete + +
+
+
+ +
+
+
+ +
+ + Case 2:Add Interaction + +
+
+ + + + +
+ + Case 3:Add an External Container + +
+
+ +
+
+ + + + Image Show -
- - -
-
- {{ headTitle }} - - {{ paragraphFirst }} - - {{ paragraphSecond }} - - - Comment - -
- - - Done - -
-
- {{ inputValue }} - - - Delete - -
-
-
- -
-
-
- -
- - Case 2:Add Interaction - -
-
- - - - -
- - Case 3:Add an External Container - -
-
- -
-
- - - - Image Show - - - - - - -
-
- - - {{ $item.value0 }} - - - - {{ $item.value1 }} - - - - {{ $item.value2 }} - - - - {{ $item.value3 }} - - - -
-
-
- -
- - Case 4:Add Static Animation - -
-
- -
- - hello - - - hello - - - hello + + + + + +
+
+ + + {{ $item.value0 }} -
-
- -
- - Case 5:Add Continuous Animation + + + {{ $item.value1 }} -
-
- -
- - continuous animation + + + {{ $item.value2 }} -
- - color - -
-
- - opacity - -
- -
-
- -
- - Case 6:Add Gesture Event + + + {{ $item.value3 }} -
-
- -
-
- {{ onClick }} - -
-
- {{ touchstart }} - -
-
- {{ touchmove }} - -
-
- {{ touchend }} - -
-
- {{ onLongPress }} - -
-
-
- -
- - Case 7:Add Page Routing - -
-
- -
- - This is the index page. - - -
-
- -
- - Case 8:Add Custom Component - -
-
- -
- - Parent Component:{{ text }} - - -
-
+ + +
+
+
+ +
+ + Case 4:Add Static Animation + +
+
+ +
+ + hello + + + hello + + + hello + +
+
+ +
+ + Case 5:Add Continuous Animation + +
+
+ +
+ + continuous animation + +
+ + color + +
+
+ + opacity + +
+ +
+
+ +
+ + Case 6:Add Gesture Event + +
+
+ +
+
+ {{ onClick }} + +
+
+ {{ touchstart }} + +
+
+ {{ touchmove }} + +
+
+ {{ touchend }} + +
+
+ {{ onLongPress }} + +
+
+
+ +
+ + Case 7:Add Page Routing + +
+
+ +
+ + This is the index page. + + +
+
+ +
+ + Case 8:Add Custom Component + +
+
+ +
+ + Parent Component:{{ text }} + + +
+
\ No newline at end of file diff --git a/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.js b/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.js index cc499d3a3..b0e54d48c 100644 --- a/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.js +++ b/UI/JSComponments/entry/src/main/js/MainAbility/pages/index/index.js @@ -16,106 +16,106 @@ import router from '@ohos.router'; export default { - data: { - inputValue: '', - commentText: false, - likeImage: '/common/unlike.png', - isPressed: false, - total: 20, - headTitle: 'Capture the Beauty in This Moment', - paragraphFirst: 'Capture the beauty of light during the transition and fusion of ice and water. At the instant of movement and stillness, softness and rigidity, force and beauty, condensing moving moments.', - paragraphSecond: 'Reflecting the purity of nature, the innovative design upgrades your visual entertainment and ergonomic comfort. Effortlessly capture what you see and let it speak for what you feel.', - middleImage: '/common/common.png', - textList: [{ - value0: 'JS FA' - }, { - value1: 'JS AA' - }, { - value2: 'Java FA' - }, { - value3: 'Java AA' - }], - tabImage: '/common/ice.png', - colorParam: '', - opacityParam: '', - touchstart: 'touchstart', - touchmove: 'touchmove', - touchend: 'touchend', - touchcancel: 'touchcancel', - onClick: 'onclick', - onLongPress: 'onlongpress', - up: 'up', - down: 'down', - text: 'start', - showState: false - }, - textClicked(e) { - this.text = e.detail.text; - }, - focusUp: function () { - this.up = 'up focused'; - }, - blurUp: function () { - this.up = 'up'; - }, - keyUp: function () { - this.up = 'up keyed'; - }, - focusDown: function () { - this.down = 'down focused'; - }, - blurDown: function () { - this.down = 'down'; - }, - keyDown: function () { - this.down = 'down keyed'; - }, - touchEnd: function () { - this.touchend = 'ended'; - }, - touchMove: function () { - this.touchmove = 'moved'; - }, - touchStart: function () { - this.touchstart = 'touched'; - }, - longPress: function () { - this.onLongPress = 'longpressed'; - }, - click: function () { - this.onClick = 'clicked'; - }, - showAnimation: function () { - this.colorParam = ''; - this.opacityParam = ''; - this.colorParam = 'animation-color'; - this.opacityParam = 'animation-opacity'; - }, - update() { - this.commentText = !this.commentText; - }, - delete() { - this.inputValue = '' - this.commentText = !this.commentText; - }, - updateValue(e) { - this.inputValue = e.text; - }, - likeClick() { - var temp; - if (!this.isPressed) { - temp = this.total + 1; - this.likeImage = '/common/like.png'; - } else { - temp = this.total - 1; - this.likeImage = '/common/unlike.png'; - } - this.total = temp; - this.isPressed = !this.isPressed; - }, - launch: function () { - router.push({ - url: 'pages/details/details', - }); + data: { + inputValue: '', + commentText: false, + likeImage: '/common/unlike.png', + isPressed: false, + total: 20, + headTitle: 'Capture the Beauty in This Moment', + paragraphFirst: 'Capture the beauty of light during the transition and fusion of ice and water. At the instant of movement and stillness, softness and rigidity, force and beauty, condensing moving moments.', + paragraphSecond: 'Reflecting the purity of nature, the innovative design upgrades your visual entertainment and ergonomic comfort. Effortlessly capture what you see and let it speak for what you feel.', + middleImage: '/common/common.png', + textList: [{ + value0: 'JS FA' + }, { + value1: 'JS AA' + }, { + value2: 'Java FA' + }, { + value3: 'Java AA' + }], + tabImage: '/common/ice.png', + colorParam: '', + opacityParam: '', + touchstart: 'touchstart', + touchmove: 'touchmove', + touchend: 'touchend', + touchcancel: 'touchcancel', + onClick: 'onclick', + onLongPress: 'onlongpress', + up: 'up', + down: 'down', + text: 'start', + showState: false + }, + textClicked(e) { + this.text = e.detail.text; + }, + focusUp: function () { + this.up = 'up focused'; + }, + blurUp: function () { + this.up = 'up'; + }, + keyUp: function () { + this.up = 'up keyed'; + }, + focusDown: function () { + this.down = 'down focused'; + }, + blurDown: function () { + this.down = 'down'; + }, + keyDown: function () { + this.down = 'down keyed'; + }, + touchEnd: function () { + this.touchend = 'ended'; + }, + touchMove: function () { + this.touchmove = 'moved'; + }, + touchStart: function () { + this.touchstart = 'touched'; + }, + longPress: function () { + this.onLongPress = 'longpressed'; + }, + click: function () { + this.onClick = 'clicked'; + }, + showAnimation: function () { + this.colorParam = ''; + this.opacityParam = ''; + this.colorParam = 'animation-color'; + this.opacityParam = 'animation-opacity'; + }, + update() { + this.commentText = !this.commentText; + }, + delete() { + this.inputValue = '' + this.commentText = !this.commentText; + }, + updateValue(e) { + this.inputValue = e.text; + }, + likeClick() { + var temp; + if (!this.isPressed) { + temp = this.total + 1; + this.likeImage = '/common/like.png'; + } else { + temp = this.total - 1; + this.likeImage = '/common/unlike.png'; } + this.total = temp; + this.isPressed = !this.isPressed; + }, + launch: function () { + router.push({ + url: 'pages/details/details', + }); + } } \ No newline at end of file diff --git a/UI/JSComponments/package.json b/UI/JSComponments/package.json index 02f5a3363..1d823ce9d 100644 --- a/UI/JSComponments/package.json +++ b/UI/JSComponments/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "^1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/UI/JSUICustomComponent/entry/src/main/js/default/pages/index/index.hml b/UI/JSUICustomComponent/entry/src/main/js/default/pages/index/index.hml index a95dab97f..83def44f2 100644 --- a/UI/JSUICustomComponent/entry/src/main/js/default/pages/index/index.hml +++ b/UI/JSUICustomComponent/entry/src/main/js/default/pages/index/index.hml @@ -1,3 +1,4 @@ +
-
- -
- {{ text }} +
+ +
+ {{ text }}
\ No newline at end of file diff --git a/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.hml b/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.hml index 755df01d9..905c9257d 100644 --- a/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.hml @@ -15,57 +15,57 @@
-
- +
+ +
+
+
+ + +
-
-
- - - -
- - -
- {{ $t('strings.title') }} - - - -
- -
- {{ $t('strings.item_name') }} - {{ $t('strings.item_description') }} -
-
- {{ $t('strings.item_right_text') }} - -
-
-
-
-
-
- {{ $t('strings.second_page') }} -
-
- {{ $t('strings.third_page') }} + + +
+ {{ $t('strings.title') }} + + + +
+ +
+ {{ $t('strings.item_name') }} + {{ $t('strings.item_description') }}
-
- {{ $t('strings.fourth_page') }} +
+ {{ $t('strings.item_right_text') }} +
-
- {{ $t('strings.fifth_page') }} -
- - -
-
- -
+
+
+
+
+
+ {{ $t('strings.second_page') }} +
+
+ {{ $t('strings.third_page') }} +
+
+ {{ $t('strings.fourth_page') }} +
+
+ {{ $t('strings.fifth_page') }} +
+
+
+
+
+ +
\ No newline at end of file diff --git a/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.js b/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.js index 2b22f51fe..73baa5d4e 100644 --- a/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.js +++ b/UI/JsAdaptivePortalList/entry/src/main/js/MainAbility/pages/index/index.js @@ -16,30 +16,30 @@ import mediaquery from '@ohos.mediaquery'; export default { - data: { - list_data: Array(16).fill().map((_, index) => ({ - id: "item_" + index - })), - tabBars: [ - { - icon: "icon_person_blue.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - ], - menu_tabs_index: 0, - isTabletLandscape: false - }, - onInit() { - mediaquery.matchMediaSync('screen and (min-aspect-ratio: 1.5) or (orientation: landscape)').on("change", (data) => { - this.isTabletLandscape = data.matches - }) - } + data: { + list_data: Array(16).fill().map((_, index) => ({ + id: "item_" + index + })), + tabBars: [ + { + icon: "icon_person_blue.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + ], + menu_tabs_index: 0, + isTabletLandscape: false + }, + onInit() { + mediaquery.matchMediaSync('screen and (min-aspect-ratio: 1.5) or (orientation: landscape)').on("change", (data) => { + this.isTabletLandscape = data.matches + }) + } } \ No newline at end of file diff --git a/UI/JsAdaptivePortalList/package.json b/UI/JsAdaptivePortalList/package.json index d8a911bd2..ed01f6a14 100644 --- a/UI/JsAdaptivePortalList/package.json +++ b/UI/JsAdaptivePortalList/package.json @@ -8,8 +8,8 @@ }, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/.gitignore b/UI/JsAdaptivePortalPage/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsAdaptivePortalPage/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/README_zh.md b/UI/JsAdaptivePortalPage/README_zh.md index 9b8779f9a..e0600efc0 100644 --- a/UI/JsAdaptivePortalPage/README_zh.md +++ b/UI/JsAdaptivePortalPage/README_zh.md @@ -30,4 +30,4 @@ 1.本示例仅支持在大型系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/entry/package.json b/UI/JsAdaptivePortalPage/entry/package.json index db08bbf9d..29732ffea 100644 --- a/UI/JsAdaptivePortalPage/entry/package.json +++ b/UI/JsAdaptivePortalPage/entry/package.json @@ -11,4 +11,4 @@ "repository": {}, "version": "1.0.0", "dependencies": {} -} \ No newline at end of file +} diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/app.js b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/app.js index c15844220..524b4481d 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/app.js +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/app.js @@ -13,10 +13,10 @@ * limitations under the License. */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.css b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.css index 7bffbb4b4..ce4726189 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.css +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.css @@ -25,7 +25,7 @@ .img-hmqs-three { width: 48px; height: 48px; - background-image:url('/common/images/item.png'); + background-image: url('/common/images/item.png'); background-size: contain; background-repeat: no-repeat; } diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.hml b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.hml index 54b83193f..37e47fed3 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.hml +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-card-item.hml @@ -14,12 +14,12 @@ -->
- -
- {{ title }} -
- - {{ author }} -
+ +
+ {{ title }} +
+ + {{ author }}
+
\ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-group-header.hml b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-group-header.hml index 103093456..c9c5a1da9 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-group-header.hml +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-group-header.hml @@ -14,11 +14,11 @@ -->
-
- {{ $t('strings.txt-content-title')}} -
-
- {{ $t('strings.txt-content-more') }} - -
+
+ {{ $t('strings.txt-content-title') }} +
+
+ {{ $t('strings.txt-content-more') }} + +
\ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.css b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.css index c8debbd21..9614f64f5 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.css +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.css @@ -45,9 +45,11 @@ width: 100%; height: 20%; } + .img-tab-bar-bottom { margin-bottom: 2px; } + .txt-tab-bar-bottom { font-size: 10px; text-align: center; diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.hml b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.hml index 35ebf5dab..c30e59456 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.hml +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/common/template-tabbar.hml @@ -14,8 +14,8 @@ -->
-
- -
- {{ text }} +
+ +
+ {{ text }}
\ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.hml b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.hml index 2ba1ee201..06b4c9261 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.hml @@ -18,185 +18,185 @@
-
-
- -
+
+
+
- - -
- - - - - {{ $item }} - - - - -
-
-
- - {{ $item.title }} -
-
- - - -
- -
- {{ $item.title }} -
-
-
-
+
+ + +
+ + + + + {{ $item }} + + + + +
+
+
+ + {{ $item.title }} +
+
+ + + +
+ +
+ {{ $item.title }} +
+
+
+
- - - - -
- - - - - - - - - -
-
-
+ + + + +
+ + + + + + + + + +
+
+
- - - - -
- - - - - - - - - -
-
-
+ + + + +
+ + + + + + + + + +
+
+
- - - - -
- - - - - - - - - -
-
-
-
-
-
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
- {{ $t('strings.txt-show') }} -
-
-
+ + + + +
+ + + + + + + + + +
+
+
+
+
+
+
+ {{ $t('strings.txt-show') }}
- {{ $t('strings.txt-show') }} + {{ $t('strings.txt-show') }}
- {{ $t('strings.txt-show') }} + {{ $t('strings.txt-show') }}
- {{ $t('strings.txt-show') }} + {{ $t('strings.txt-show') }}
- {{ $t('strings.txt-show') }} + {{ $t('strings.txt-show') }}
-
-
-
- -
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+ + +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+ {{ $t('strings.txt-show') }} +
+
+
+
+ +
\ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.js b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.js index ee23e8115..7e7e9d91b 100644 --- a/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.js +++ b/UI/JsAdaptivePortalPage/entry/src/main/js/MainAbility/pages/index/index.js @@ -16,40 +16,40 @@ import mediaquery from '@ohos.mediaquery'; export default { - data: { - subTabList: ["子页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签"], - listOne: Array(5).fill(0).map((_, index) => ({ - uri: "", title: "item", id: "item_" + index - })), - listTwo: Array(16).fill(0).map((_, index) => ({ - uri: "", title: "item " + index, id: "item_" + index - })), - listThree: Array(16).fill(0).map((_, index) => ({ - msg1: "The End Of The World", msg2: "Justin Timberland", id: "item_" + index - })), - tabBars: [ - { - icon: "icon_person_blue.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - { - icon: "icon_person_gray.png", text: "页签" - }, - ], - isTablet: false, - menu_tabs_index: 0 - }, - onInit() { - mediaquery.matchMediaSync('screen and (min-aspect-ratio: 1.5) or (orientation: landscape)').on("change", (data) => { - this.isTablet = data.matches - }) - } + data: { + subTabList: ["子页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签", "页签"], + listOne: Array(5).fill(0).map((_, index) => ({ + uri: "", title: "item", id: "item_" + index + })), + listTwo: Array(16).fill(0).map((_, index) => ({ + uri: "", title: "item " + index, id: "item_" + index + })), + listThree: Array(16).fill(0).map((_, index) => ({ + msg1: "The End Of The World", msg2: "Justin Timberland", id: "item_" + index + })), + tabBars: [ + { + icon: "icon_person_blue.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + { + icon: "icon_person_gray.png", text: "页签" + }, + ], + isTablet: false, + menu_tabs_index: 0 + }, + onInit() { + mediaquery.matchMediaSync('screen and (min-aspect-ratio: 1.5) or (orientation: landscape)').on("change", (data) => { + this.isTablet = data.matches + }) + } } \ No newline at end of file diff --git a/UI/JsAdaptivePortalPage/package.json b/UI/JsAdaptivePortalPage/package.json index 56a139289..c207eead3 100644 --- a/UI/JsAdaptivePortalPage/package.json +++ b/UI/JsAdaptivePortalPage/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/.gitignore b/UI/JsAdaptiveServiceWidget/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsAdaptiveServiceWidget/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/README_zh.md b/UI/JsAdaptiveServiceWidget/README_zh.md index c457602ad..58d4a4c70 100644 --- a/UI/JsAdaptiveServiceWidget/README_zh.md +++ b/UI/JsAdaptiveServiceWidget/README_zh.md @@ -22,4 +22,4 @@ Ability开发:Ability开发概述。 1.本示例支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/Logger.js b/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/Logger.js index db0515069..962b6f3d9 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/Logger.js +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/Logger.js @@ -13,30 +13,28 @@ * limitations under the License. */ -// - class Logger { - prefix = '' + prefix = '' - constructor(prefix) { - this.prefix = prefix - } + constructor(prefix) { + this.prefix = prefix + } - debug(...args) { - console.debug(this.prefix + args) - } + debug(...args) { + console.debug(this.prefix + args) + } - info(...args) { - console.info(this.prefix + args) - } + info(...args) { + console.info(this.prefix + args) + } - warn(...args) { - console.warn(this.prefix + args) - } + warn(...args) { + console.warn(this.prefix + args) + } - error(...args) { - console.error(this.prefix + args) - } + error(...args) { + console.error(this.prefix + args) + } } export default new Logger('[JsAdaptiveServiceWidget]') \ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/form.js b/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/form.js index e0f250f2d..c7d472dbd 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/form.js +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/FormAbility/form.js @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 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. + */ import dataStorage from '@ohos.data.storage'; import formBindingData from '@ohos.application.formBindingData'; @@ -5,176 +19,175 @@ import formInfo from '@ohos.application.formInfo'; import formProvider from '@ohos.application.formProvider'; import Logger from './Logger' - const DATA_STORAGE_PATH = "/data/storage/el2/base/haps/form_store"; const FORM_PARAM_IDENTITY_KEY = "ohos.extra.param.key.form_identity"; const FORM_PARAM_NAME_KEY = "ohos.extra.param.key.form_name"; const FORM_PARAM_TEMPORARY_KEY = "ohos.extra.param.key.form_temporary"; function getTemperature(formId, count) { - const DECIMAL = 10; - const parsedFormId = parseInt(formId, DECIMAL); - const BASE_TEMP_MOD = 20; - const baseTemperature = parsedFormId % BASE_TEMP_MOD; - const RANGE_TEMP_MOD = 20; - return baseTemperature + Math.abs(count % RANGE_TEMP_MOD - RANGE_TEMP_MOD / 2); + const DECIMAL = 10; + const parsedFormId = parseInt(formId, DECIMAL); + const BASE_TEMP_MOD = 20; + const baseTemperature = parsedFormId % BASE_TEMP_MOD; + const RANGE_TEMP_MOD = 20; + return baseTemperature + Math.abs(count % RANGE_TEMP_MOD - RANGE_TEMP_MOD / 2); } function padZero(num) { - // trans num to string and pad 0 - if (num < 10) { - return `0${num}`; - } else { - return num.toString(); - } + // trans num to string and pad 0 + if (num < 10) { + return `0${num}`; + } else { + return num.toString(); + } } function getTime() { - const date = new Date(); - const hours = padZero(date.getHours()); - const minutes = padZero(date.getMinutes()); - const seconds = padZero(date.getSeconds()); - return `${hours}:${minutes}:${seconds}` + const date = new Date(); + const hours = padZero(date.getHours()); + const minutes = padZero(date.getMinutes()); + const seconds = padZero(date.getSeconds()); + return `${hours}:${minutes}:${seconds}` } async function storeFormInfo(formId, formName, tempFlag) { - let formInfo = { - "formName": formName, - "tempFlag": tempFlag, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // put form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.info(`storeFormInfo, put form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to storeFormInfo, err: ${JSON.stringify(err)}`); - } + let formInfo = { + "formName": formName, + "tempFlag": tempFlag, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // put form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.info(`storeFormInfo, put form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to storeFormInfo, err: ${JSON.stringify(err)}`); + } } async function updateTempFormInfo(formId) { - let formInfoDefault = { - "formName": "", - "tempFlag": false, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // get form info - const data = await storage.get(formId, JSON.stringify(formInfoDefault)); - Logger.info(`updateTempFormInfo, get form info successfully, formId: ${formId}`); - const formInfo = JSON.parse(data.toString()); - if (!formInfo.tempFlag) { - Logger.info(`updateTempFormInfo, formId: ${formId} is not temporary.`); - return; - } - - formInfo.tempFlag = false; - // update form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.info(`updateTempFormInfo, update form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to updateTempFormInfo, err: ${JSON.stringify(err)}`); + let formInfoDefault = { + "formName": "", + "tempFlag": false, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // get form info + const data = await storage.get(formId, JSON.stringify(formInfoDefault)); + Logger.info(`updateTempFormInfo, get form info successfully, formId: ${formId}`); + const formInfo = JSON.parse(data.toString()); + if (!formInfo.tempFlag) { + Logger.info(`updateTempFormInfo, formId: ${formId} is not temporary.`); + return; } + + formInfo.tempFlag = false; + // update form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.info(`updateTempFormInfo, update form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to updateTempFormInfo, err: ${JSON.stringify(err)}`); + } } async function updateForm(formId) { - let formInfoDefault = { - "formName": "", - "tempFlag": false, - "updateCount": 0 + let formInfoDefault = { + "formName": "", + "tempFlag": false, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // get form info + const data = await storage.get(formId, JSON.stringify(formInfoDefault)); + Logger.info(`updateForm, get form info successfully, formId: ${formId}`); + const formInfo = JSON.parse(data.toString()); + formInfo.updateCount = formInfo.updateCount + 1; + + let obj = { + "temperature": getTemperature(formId, formInfo.updateCount).toString(), + "time": getTime() }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // get form info - const data = await storage.get(formId, JSON.stringify(formInfoDefault)); - Logger.info(`updateForm, get form info successfully, formId: ${formId}`); - const formInfo = JSON.parse(data.toString()); - formInfo.updateCount = formInfo.updateCount + 1; - - let obj = { - "temperature": getTemperature(formId, formInfo.updateCount).toString(), - "time": getTime() - }; - let formData = formBindingData.createFormBindingData(obj); - formProvider.updateForm(formId, formData).catch((err) => { - Logger.error(`updateForm, err: ${JSON.stringify(err)}`); - }); - - // update form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.info(`updateForm, update form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to updateForm, err: ${JSON.stringify(err)}`); - } + let formData = formBindingData.createFormBindingData(obj); + formProvider.updateForm(formId, formData).catch((err) => { + Logger.error(`updateForm, err: ${JSON.stringify(err)}`); + }); + + // update form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.info(`updateForm, update form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to updateForm, err: ${JSON.stringify(err)}`); + } } async function deleteFormInfo(formId) { - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // del form info - await storage.delete(formId); - Logger.info(`deleteFormInfo, del form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to deleteFormInfo, err: ${JSON.stringify(err)}`); - } + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // del form info + await storage.delete(formId); + Logger.info(`deleteFormInfo, del form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to deleteFormInfo, err: ${JSON.stringify(err)}`); + } } export default { - onCreate(want) { - Logger.info(`FormAbility onCreate, want: ${JSON.stringify(want)}`); - // Called to return a FormBindingData object. - - let formId = want.parameters[FORM_PARAM_IDENTITY_KEY]; - let formName = want.parameters[FORM_PARAM_NAME_KEY]; - let tempFlag = want.parameters[FORM_PARAM_TEMPORARY_KEY]; - storeFormInfo(formId, formName, tempFlag); - - let obj = { - "temperature": getTemperature(formId, 0).toString(), - "time": getTime() - }; - let formData = {}; - return formBindingData.createFormBindingData(formData); - }, - - onCastToNormal(formId) { - // Called when the form provider is notified that a temporary form is successfully - // converted to a normal form. - Logger.info(`FormAbility onCastToNormal, formId: ${formId}`); - updateTempFormInfo(formId); - }, - - onUpdate(formId) { - // Called to notify the form provider to update a specified form. - Logger.info(`FormAbility onUpdate, formId: ${formId}`); - updateForm(formId); - }, - - onVisibilityChange(newStatus) { - // Called when the form provider receives form events from the system. - Logger.info(`FormAbility onVisibilityChange`); - }, - - onEvent(formId, message) { - // Called when a specified message event defined by the form provider is triggered. - Logger.info(`FormAbility onEvent, formId = ${formId}, message: ${JSON.stringify(message)}`); - }, - - onDestroy(formId) { - // Called to notify the form provider that a specified form has been destroyed. - Logger.info(`FormAbility onDestroy, formId = ${formId}`); - deleteFormInfo(formId); - }, - - onAcquireFormState(want) { - // Called to return a {@link FormState} object. - Logger.info(`FormAbility onAcquireFormState`); - return formInfo.FormState.READY; - } + onCreate(want) { + Logger.info(`FormAbility onCreate, want: ${JSON.stringify(want)}`); + // Called to return a FormBindingData object. + + let formId = want.parameters[FORM_PARAM_IDENTITY_KEY]; + let formName = want.parameters[FORM_PARAM_NAME_KEY]; + let tempFlag = want.parameters[FORM_PARAM_TEMPORARY_KEY]; + storeFormInfo(formId, formName, tempFlag); + + let obj = { + "temperature": getTemperature(formId, 0).toString(), + "time": getTime() + }; + let formData = {}; + return formBindingData.createFormBindingData(formData); + }, + + onCastToNormal(formId) { + // Called when the form provider is notified that a temporary form is successfully + // converted to a normal form. + Logger.info(`FormAbility onCastToNormal, formId: ${formId}`); + updateTempFormInfo(formId); + }, + + onUpdate(formId) { + // Called to notify the form provider to update a specified form. + Logger.info(`FormAbility onUpdate, formId: ${formId}`); + updateForm(formId); + }, + + onVisibilityChange(newStatus) { + // Called when the form provider receives form events from the system. + Logger.info(`FormAbility onVisibilityChange`); + }, + + onEvent(formId, message) { + // Called when a specified message event defined by the form provider is triggered. + Logger.info(`FormAbility onEvent, formId = ${formId}, message: ${JSON.stringify(message)}`); + }, + + onDestroy(formId) { + // Called to notify the form provider that a specified form has been destroyed. + Logger.info(`FormAbility onDestroy, formId = ${formId}`); + deleteFormInfo(formId); + }, + + onAcquireFormState(want) { + // Called to return a {@link FormState} object. + Logger.info(`FormAbility onAcquireFormState`); + return formInfo.FormState.READY; + } } \ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/app.js b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/app.js index 6d060ffe5..6d4065abc 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/app.js +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/app.js @@ -1,8 +1,23 @@ +/* + * Copyright (c) 2021 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. + */ + export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.css b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.css index dcd80e57a..3b173216d 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.css +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.css @@ -39,7 +39,7 @@ margin-right: 6.7%; } -.body{ +.body { margin-top: 10%; margin-bottom: 1%; margin-left: 6.7%; diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.hml b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.hml index 1c4427466..d9a2a0434 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.hml @@ -14,10 +14,10 @@ -->
-
- {{ $t('strings.title') }} -
-
- {{ text }} -
+
+ {{ $t('strings.title') }} +
+
+ {{ text }} +
diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.js b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.js index 456819aff..9d81b589b 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.js +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/MainAbility/pages/index/index.js @@ -14,10 +14,10 @@ */ export default { - data: { - text: "" - }, - onInit() { - this.text = this.$t('strings.text'); - } + data: { + text: "" + }, + onInit() { + this.text = this.$t('strings.text'); + } } diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/complex/pages/index/index.hml b/UI/JsAdaptiveServiceWidget/entry/src/main/js/complex/pages/index/index.hml index 36297fce9..27aa25fec 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/complex/pages/index/index.hml +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/complex/pages/index/index.hml @@ -14,41 +14,41 @@ -->
-
- - {{ title }} +
+ + {{ title }} +
+
+
+ {{ $item.name }} + {{ $item.num }} +
+ {{ $item.float }} + {{ $item.per }} +
-
-
- {{ $item.name }} - {{ $item.num }} -
- {{ $item.float }} - {{ $item.per }} -
-
+
+
+
+ {{ fundText }} + {{ timeText }} + {{ timeText }}
-
-
- {{ fundText }} - {{ timeText }} - {{ timeText }} -
-
-
-
- {{ $item.name }} - {{ $item.coded }} -
- {{ $item.perFront }} - {{ $item.perAfter }} -
+
+
+
+ {{ $item.name }} + {{ $item.coded }}
+ {{ $item.perFront }} + {{ $item.perAfter }} +
-
-
- - {{ $item.text }} -
+
+
+
+ + {{ $item.text }}
+
\ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.css b/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.css index 4cf68faa1..a498a7f39 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.css +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.css @@ -74,6 +74,7 @@ align-items: flex-end; align-content: flex-end; } + .stack-right { margin-left: 5%; justify-content: flex-end; diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.hml b/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.hml index 4f2fa11cd..5f0618820 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.hml +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/grid/pages/index/index.hml @@ -14,28 +14,28 @@ -->
-
- - {{ $t('strings.title') }} -
-
- - - 0.33 - - - - 0.33 - -
-
- - - 0.33 - - - - 0.33 - -
+
+ + {{ $t('strings.title') }} +
+
+ + + 0.33 + + + + 0.33 + +
+
+ + + 0.33 + + + + 0.33 + +
\ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/imgText/pages/index/index.hml b/UI/JsAdaptiveServiceWidget/entry/src/main/js/imgText/pages/index/index.hml index 4523b3c5c..e6fc60922 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/imgText/pages/index/index.hml +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/imgText/pages/index/index.hml @@ -14,19 +14,19 @@ -->
- -
- -
-
- {{title}} -
-
-
-
- - {{ $item.title }} - {{ $item.detail }} -
+ +
+
+
+ {{ title }} +
+
+
+
+ + {{ $item.title }} + {{ $item.detail }} +
+
\ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/immersive/pages/index/index.hml b/UI/JsAdaptiveServiceWidget/entry/src/main/js/immersive/pages/index/index.hml index d15d47279..4ce2593b3 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/immersive/pages/index/index.hml +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/immersive/pages/index/index.hml @@ -14,10 +14,10 @@ -->
-
- -
-
- -
+
+ +
+
+ +
\ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/entry/src/main/js/text/pages/index/index.hml b/UI/JsAdaptiveServiceWidget/entry/src/main/js/text/pages/index/index.hml index 434ea8fb8..1c23ccaad 100644 --- a/UI/JsAdaptiveServiceWidget/entry/src/main/js/text/pages/index/index.hml +++ b/UI/JsAdaptiveServiceWidget/entry/src/main/js/text/pages/index/index.hml @@ -14,14 +14,14 @@ -->
-
-
- {{ $item.name }} - {{ $item.exponent }} -
-
- {{ $item.coded }} - {{ $item.per }} -
+
+
+ {{ $item.name }} + {{ $item.exponent }}
+
+ {{ $item.coded }} + {{ $item.per }} +
+
\ No newline at end of file diff --git a/UI/JsAdaptiveServiceWidget/package.json b/UI/JsAdaptiveServiceWidget/package.json index 45f295749..ce0caaf36 100644 --- a/UI/JsAdaptiveServiceWidget/package.json +++ b/UI/JsAdaptiveServiceWidget/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/UI/JsAnimation/.gitignore b/UI/JsAnimation/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsAnimation/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsAnimation/README_zh.md b/UI/JsAnimation/README_zh.md index 1e81fa3d8..d9b57e179 100644 --- a/UI/JsAnimation/README_zh.md +++ b/UI/JsAnimation/README_zh.md @@ -22,4 +22,4 @@ 1.本示例仅支持在大型系统上运行,且参考内存 ≥ 1GiB。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/JsAnimation/package.json b/UI/JsAnimation/package.json index e9b2e3698..b6dc67013 100644 --- a/UI/JsAnimation/package.json +++ b/UI/JsAnimation/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/UI/JsAnimationStyle/.gitignore b/UI/JsAnimationStyle/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsAnimationStyle/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsAnimationStyle/README_zh.md b/UI/JsAnimationStyle/README_zh.md index c1e0f8d39..9c4412083 100644 --- a/UI/JsAnimationStyle/README_zh.md +++ b/UI/JsAnimationStyle/README_zh.md @@ -32,5 +32,5 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/app.js b/UI/JsAnimationStyle/entry/src/main/js/default/app.js index 8e47afff1..50007322f 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/app.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.css index b9308ce62..0f438433d 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.css @@ -26,20 +26,21 @@ background-color: #f76160; width: 100px; height: 100px; - animation-name:compositeAnimation ; + animation-name: compositeAnimation; animation-duration: 4s; animation-delay: 0s; animation-iteration-count: infinite; animation-timing-function: linear; } -@keyframes compositeAnimation -{ + +@keyframes compositeAnimation { from { background-color: #f76160; - transform:translate(100px,100px) rotate(0deg) scale(1.0); + transform: translate(100px, 100px) rotate(0deg) scale(1.0); } + to { background-color: #09ba07; - transform:translate(200px,200px) rotate(180deg) scale(1.5); + transform: translate(200px, 200px) rotate(180deg) scale(1.5); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.hml index dd10b0876..ebe2bd346 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.hml @@ -14,7 +14,7 @@ -->
- - {{ $t('strings.compositeAnimation') }} - + + {{ $t('strings.compositeAnimation') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.js index 699c71d0b..7859b5b08 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/compositeanimation/compositeanimation.js @@ -14,8 +14,7 @@ */ export default { - data: { - }, - onInit() { - } + data: {}, + onInit() { + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.css index 25abd2fe5..678cddeb2 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.css @@ -19,7 +19,7 @@ flex-direction: column; justify-content: center; align-items: center; - padding:10px; + padding: 10px; } .translate_style { @@ -37,13 +37,13 @@ animation-timing-function: linear; } -@keyframes translate_animation -{ +@keyframes translate_animation { from { - transform:translate(0px) ; + transform: translate(0px); } + to { - transform:translate(150px) ; + transform: translate(150px); } } @@ -62,13 +62,13 @@ animation-timing-function: linear; } -@keyframes rotate_animation -{ +@keyframes rotate_animation { from { - transform:rotate(0deg); + transform: rotate(0deg); } + to { - transform:rotate(180deg); + transform: rotate(180deg); } } @@ -87,13 +87,13 @@ animation-timing-function: linear; } -@keyframes scale_animation -{ +@keyframes scale_animation { from { transform: scale(1.0); } + to { - transform:scale(2.0); + transform: scale(2.0); } } @@ -104,20 +104,21 @@ background-color: #f76160; width: 100px; height: 100px; - animation-name:compositeAnimation ; + animation-name: compositeAnimation; animation-duration: 4s; animation-delay: 0s; animation-iteration-count: infinite; animation-timing-function: linear; } -@keyframes compositeAnimation -{ + +@keyframes compositeAnimation { from { background-color: #f76160; - transform:translate(-100px,-100px) rotate(0deg) scale(1.0); + transform: translate(-100px, -100px) rotate(0deg) scale(1.0); } + to { background-color: #09ba07; - transform:translate(200px,100px) rotate(180deg) scale(1.5); + transform: translate(200px, 100px) rotate(180deg) scale(1.5); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.hml index 73cffeb81..cc0a6a1e4 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.hml @@ -14,16 +14,16 @@ -->
- - {{ $t('strings.translate') }} - - - {{ $t('strings.rotate') }} - - - {{ $t('strings.scale') }} - - - {{ $t('strings.compositeAnimation') }} - + + {{ $t('strings.translate') }} + + + {{ $t('strings.rotate') }} + + + {{ $t('strings.scale') }} + + + {{ $t('strings.compositeAnimation') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.js index 03be156b1..72890be93 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/index/index.js @@ -16,30 +16,30 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, - onClickTranslate() { - router.push({ - url: 'pages/animation/translate/translate' - }) - }, + data: {}, + onInit() { + }, + onClickTranslate() { + router.push({ + url: 'pages/animation/translate/translate' + }) + }, - onClickRotate() { - router.push({ - url: 'pages/animation/rotate/rotate' - }) - }, + onClickRotate() { + router.push({ + url: 'pages/animation/rotate/rotate' + }) + }, - onClickScale() { - router.push({ - url: 'pages/animation/scale/scale' - }) - }, + onClickScale() { + router.push({ + url: 'pages/animation/scale/scale' + }) + }, - onClickComposite() { - router.push({ - url: 'pages/animation/compositeanimation/compositeanimation' - }) - } + onClickComposite() { + router.push({ + url: 'pages/animation/compositeanimation/compositeanimation' + }) + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.css index 0fc7efce2..a1e8d3452 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.css @@ -33,12 +33,12 @@ animation-timing-function: linear; } -@keyframes rotate_animation -{ +@keyframes rotate_animation { from { - transform:rotate(0deg); + transform: rotate(0deg); } + to { - transform:rotate(180deg); + transform: rotate(180deg); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.hml index e8ab77dd0..61f9602e5 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.hml @@ -14,7 +14,7 @@ -->
- - {{ $t('strings.rotate') }} - + + {{ $t('strings.rotate') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.js index 699c71d0b..7859b5b08 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/rotate/rotate.js @@ -14,8 +14,7 @@ */ export default { - data: { - }, - onInit() { - } + data: {}, + onInit() { + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.css index 783217395..e2beb2d70 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.css @@ -33,12 +33,12 @@ animation-timing-function: linear; } -@keyframes scale_animation -{ +@keyframes scale_animation { from { transform: scale(1.0); } + to { - transform:scale(2.0); + transform: scale(2.0); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.hml index ed2f6797e..edcfaa01c 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.hml @@ -14,7 +14,7 @@ -->
- - {{ $t('strings.scale') }} - + + {{ $t('strings.scale') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.js index 699c71d0b..7859b5b08 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/scale/scale.js @@ -14,8 +14,7 @@ */ export default { - data: { - }, - onInit() { - } + data: {}, + onInit() { + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.css index 9de123358..230c7ac8a 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.css @@ -34,12 +34,12 @@ animation-timing-function: linear; } -@keyframes translate_animation -{ +@keyframes translate_animation { from { - transform:translate(0px) ; + transform: translate(0px); } + to { - transform:translate(150px) ; + transform: translate(150px); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.hml index 9216ca711..d570447a2 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.hml @@ -14,7 +14,7 @@ -->
- - {{ $t('strings.translate') }} - + + {{ $t('strings.translate') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.js index 699c71d0b..7859b5b08 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/animation/translate/translate.js @@ -14,8 +14,7 @@ */ export default { - data: { - }, - onInit() { - } + data: {}, + onInit() { + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.css index 13422eed2..60e4c9dda 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.css @@ -21,7 +21,7 @@ background-color: aliceblue; } -.demo-default{ +.demo-default { font-size: 20px; } @@ -30,7 +30,8 @@ margin-top: 10px; font-size: 20px; } -@font-face{ + +@font-face { font-family: font_bold; src: url("/common/style/SourceHanSansSC-Bold.otf"); } @@ -40,7 +41,8 @@ margin-top: 10px; font-size: 20px; } -@font-face{ + +@font-face { font-family: font_extraLight; src: url("/common/style/SourceHanSansSC-ExtraLight.otf"); } @@ -50,7 +52,8 @@ margin-top: 10px; font-size: 20px; } -@font-face{ + +@font-face { font-family: font_heavy; src: url("/common/style/SourceHanSansSC-Heavy.otf"); } @@ -60,7 +63,8 @@ margin-top: 10px; font-size: 20px; } -@font-face{ + +@font-face { font-family: font_medium; src: url("/common/style/SourceHanSansSC-Medium.otf"); } @@ -70,7 +74,8 @@ margin-top: 10px; font-size: 20px; } -@font-face{ + +@font-face { font-family: font_normal; src: url("/common/style/SourceHanSansSC-Normal.otf"); } @@ -80,7 +85,8 @@ margin-top: 10px; font-size: 20px; } -@font-face{ + +@font-face { font-family: font_regular; src: url("/common/style/SourceHanSansSC-Regular.otf"); } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.hml index 6a8aeb19a..880615349 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.hml @@ -14,11 +14,11 @@ -->
- {{$t('strings.txt_default')}} - {{$t('strings.txt_bold')}} - {{$t('strings.txt_extraLight')}} - {{$t('strings.txt_heavy')}} - {{$t('strings.txt_medium')}} - {{$t('strings.txt_normal')}} - {{$t('strings.txt_regular')}} + {{ $t('strings.txt_default') }} + {{ $t('strings.txt_bold') }} + {{ $t('strings.txt_extraLight') }} + {{ $t('strings.txt_heavy') }} + {{ $t('strings.txt_medium') }} + {{ $t('strings.txt_normal') }} + {{ $t('strings.txt_regular') }}
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.js index 699c71d0b..7859b5b08 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/customfont/index.js @@ -14,8 +14,7 @@ */ export default { - data: { - }, - onInit() { - } + data: {}, + onInit() { + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.css index 0dab878c3..70b577e7f 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.css @@ -19,40 +19,41 @@ align-items: center; } -.style_default{ +.style_default { height: 20%; width: 100%; - font-size:10px; + font-size: 10px; text-color: black; padding-left: 10px; - background: linear-gradient(rgb(255,0,0),rgb(0, 255, 0)); + background: linear-gradient(rgb(255, 0, 0), rgb(0, 255, 0)); } -.style_angle{ + +.style_angle { height: 20%; width: 100%; - font-size:10px; + font-size: 10px; text-color: black; padding-left: 10px; margin-top: 2%; - background: linear-gradient(45deg, rgb(255,0,0),rgb(0, 255, 0)); + background: linear-gradient(45deg, rgb(255, 0, 0), rgb(0, 255, 0)); } -.style_right{ +.style_right { height: 20%; width: 100%; - font-size:10px; + font-size: 10px; text-color: black; padding-left: 10px; margin-top: 2%; - background: linear-gradient(to right, rgb(255,0,0) 90px, rgb(0, 0, 255) 60%); + background: linear-gradient(to right, rgb(255, 0, 0) 90px, rgb(0, 0, 255) 60%); } -.style_repeat{ +.style_repeat { height: 20%; width: 100%; - font-size:10px; + font-size: 10px; text-color: black; padding-left: 10px; margin-top: 2%; - background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); + background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px, rgba(0, 0, 255, .5) 60px); } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.hml index dc580baa3..f473aa1ff 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.hml @@ -14,19 +14,19 @@ -->
- - {{ $t('strings.default') }} - + + {{ $t('strings.default') }} + - - {{ $t('strings.angle') }} - + + {{ $t('strings.angle') }} + - - {{ $t('strings.right') }} - + + {{ $t('strings.right') }} + - - {{ $t('strings.repeat') }} - + + {{ $t('strings.repeat') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.js index 699c71d0b..7859b5b08 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/gradient/index.js @@ -14,8 +14,7 @@ */ export default { - data: { - }, - onInit() { - } + data: {}, + onInit() { + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.css index 5d24ce870..f21db4184 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.css @@ -20,6 +20,7 @@ align-items: center; padding: 10px; } + .btn { width: 60%; height: 50px; diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.hml index c5fe11013..eec681d73 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.hml @@ -14,8 +14,8 @@ -->
- - - - + + + +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.js index d23469de4..8167e2a5b 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/index/index.js @@ -16,31 +16,31 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, + data: {}, + onInit() { + }, - onClickAnimationStyle() { - router.push({ - url: 'pages/animation/index/index' - }) - }, + onClickAnimationStyle() { + router.push({ + url: 'pages/animation/index/index' + }) + }, - onClickGradientStyle() { - router.push({ - url: 'pages/gradient/index' - }) - }, + onClickGradientStyle() { + router.push({ + url: 'pages/gradient/index' + }) + }, - onClickTransitionStyle() { - router.push({ - url: 'pages/transitions/index/index' - }) - }, + onClickTransitionStyle() { + router.push({ + url: 'pages/transitions/index/index' + }) + }, - onClickCustomFontStyle() { - router.push({ - url: 'pages/customfont/index' - }) - } + onClickCustomFontStyle() { + router.push({ + url: 'pages/customfont/index' + }) + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.css index fce3ae36d..b4cdb9d05 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.css @@ -18,6 +18,7 @@ align-items: center; background-color: #EBFFD7; } + .div { height: 100%; flex-direction: column; diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.hml index 513b0dc3f..6ad0530f5 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.hml @@ -14,7 +14,7 @@ -->
-
- {{ $t('strings.detail') }} -
+
+ {{ $t('strings.detail') }} +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.js index 00a5a554a..e950aaa20 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtargetpage/cardtargetpage.js @@ -16,11 +16,11 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, + data: {}, + onInit() { + }, - jumpBack() { - router.back(); - } + jumpBack() { + router.back(); + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.css index 31afc0135..095e3af5d 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.css @@ -20,11 +20,13 @@ align-items: center; background-color: #ABDAFF; } + .item { height: 80px; background-color: #FAFAFA; margin-top: 2px; } + .outer { width: 300px; height: 100px; diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.hml index b49a715ec..267f0524b 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/cardtransition/cardtransition.hml @@ -14,13 +14,13 @@ -->
-
- {{$t('strings.remove')}} -
- - - {{$item.title}} - - +
+ {{ $t('strings.remove') }} +
+ + + {{ $item.title }} + +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.css index 80d5b38da..257707b2f 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.css @@ -41,6 +41,7 @@ transform: translateX(750px); opacity: 0; } + to { transform: translateX(0px); opacity: 1; diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.hml index 1a2e075bb..3f5155661 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.hml @@ -14,7 +14,7 @@ -->
-
- -
+
+ +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.js index 00a5a554a..e950aaa20 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtarget/customtarget.js @@ -16,11 +16,11 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, + data: {}, + onInit() { + }, - jumpBack() { - router.back(); - } + jumpBack() { + router.back(); + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.css index fd3947b83..55b3d896a 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.css @@ -33,6 +33,7 @@ transform: translateX(0px); opacity: 1; } + to { transform: translateX(-750px); opacity: 0; diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.hml index fb159cef0..cf31bdd51 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.hml @@ -14,5 +14,5 @@ -->
- +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.js index 99c31be27..e7788c17f 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/customtransition/customtransition.js @@ -16,13 +16,13 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, + data: {}, + onInit() { + }, - onClickCustomTarget() { - router.push({ - url: 'pages/transitions/customtarget/customtarget' - }) - } + onClickCustomTarget() { + router.push({ + url: 'pages/transitions/customtarget/customtarget' + }) + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.hml index b8f9e8901..e21f7d9a8 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.hml @@ -14,7 +14,7 @@ -->
- - - + + +
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.js index 4969d13c2..aa9f759ec 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/index/index.js @@ -16,24 +16,24 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, - onClickElement() { - router.push({ - url: 'pages/transitions/sharedelement/sharedelement' - }) - }, + data: {}, + onInit() { + }, + onClickElement() { + router.push({ + url: 'pages/transitions/sharedelement/sharedelement' + }) + }, - onClickCard() { - router.push({ - url: 'pages/transitions/cardtransition/cardtransition' - }) - }, + onClickCard() { + router.push({ + url: 'pages/transitions/cardtransition/cardtransition' + }) + }, - onClickCustomTransition() { - router.push({ - url: 'pages/transitions/customtransition/customtransition' - }) - } + onClickCustomTransition() { + router.push({ + url: 'pages/transitions/customtransition/customtransition' + }) + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.css index e3b311ad1..f387db350 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.css @@ -31,13 +31,15 @@ shared-transition-name: shared-transition; shared-transition-timing-function: friction; } + @keyframes shared-transition { from { opacity: 0; - transform:translate(20px) ; + transform: translate(20px); } + to { opacity: 1; - transform:translate(100px) ; + transform: translate(100px); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.hml index 1e89d5893..85b3fcae5 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.hml @@ -14,5 +14,6 @@ -->
- {{ $t('strings.sharedjump') }} + {{ + $t('strings.sharedjump') }}
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.js index 3599c6e45..bf9bc810f 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedelement/sharedelement.js @@ -16,13 +16,13 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, + data: {}, + onInit() { + }, - jumpSharedTargetPage() { - router.push({ - url: 'pages/transitions/sharedtargetpage/sharedtargetpage', - }); - } + jumpSharedTargetPage() { + router.push({ + url: 'pages/transitions/sharedtargetpage/sharedtargetpage', + }); + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.css b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.css index 580ed254d..4f582854e 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.css +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.css @@ -30,13 +30,15 @@ shared-transition-name: shared-transition; shared-transition-timing-function: friction; } + @keyframes shared-transition { from { opacity: 1; - transform:translate(20px) ; + transform: translate(20px); } + to { opacity: 0; - transform:translate(100px) ; + transform: translate(100px); } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.hml b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.hml index 11faef5e1..64dd5757f 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.hml +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.hml @@ -14,5 +14,6 @@ -->
- {{ $t('strings.sharedpaget') }} + {{ + $t('strings.sharedpaget') }}
\ No newline at end of file diff --git a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.js b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.js index 00a5a554a..e950aaa20 100644 --- a/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.js +++ b/UI/JsAnimationStyle/entry/src/main/js/default/pages/transitions/sharedtargetpage/sharedtargetpage.js @@ -16,11 +16,11 @@ import router from '@ohos.router' export default { - data: {}, - onInit() { - }, + data: {}, + onInit() { + }, - jumpBack() { - router.back(); - } + jumpBack() { + router.back(); + } } \ No newline at end of file diff --git a/UI/JsAnimationStyle/package.json b/UI/JsAnimationStyle/package.json index 3c6c841a5..e8b4f8ec9 100644 --- a/UI/JsAnimationStyle/package.json +++ b/UI/JsAnimationStyle/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/JsAnimator/.gitignore b/UI/JsAnimator/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsAnimator/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsAnimator/README_zh.md b/UI/JsAnimator/README_zh.md index 2442026c2..7c65c7927 100644 --- a/UI/JsAnimator/README_zh.md +++ b/UI/JsAnimator/README_zh.md @@ -29,4 +29,4 @@ 2.@ohos.animator库目前仅支持类web方式调用,ets暂不支持。 -3.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/JsAnimator/entry/src/main/js/MainAbility/app.js b/UI/JsAnimator/entry/src/main/js/MainAbility/app.js index e3a0891c0..e2e723dcb 100644 --- a/UI/JsAnimator/entry/src/main/js/MainAbility/app.js +++ b/UI/JsAnimator/entry/src/main/js/MainAbility/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/UI/JsAnimator/entry/src/main/js/MainAbility/pages/index/index.css b/UI/JsAnimator/entry/src/main/js/MainAbility/pages/index/index.css index 81233c12b..aa9665e4d 100644 --- a/UI/JsAnimator/entry/src/main/js/MainAbility/pages/index/index.css +++ b/UI/JsAnimator/entry/src/main/js/MainAbility/pages/index/index.css @@ -14,76 +14,76 @@ */ .container { - flex-direction: column; - width: 100%; - height: 100%; - opacity: 0.75; - background-color: #F2F3F5; + flex-direction: column; + width: 100%; + height: 100%; + opacity: 0.75; + background-color: #F2F3F5; } .title { - align-items: center; - font-size: 30fp; - text-align: center; - width: 100%; - height: 8%; - background-color: deepskyblue; + align-items: center; + font-size: 30fp; + text-align: center; + width: 100%; + height: 8%; + background-color: deepskyblue; } .sunAnimation { - display: flex; - flex-direction: column; - justify-content: flex-end; - left: 0px; - top: 0px; - width: 100%; - height: 40%; + display: flex; + flex-direction: column; + justify-content: flex-end; + left: 0px; + top: 0px; + width: 100%; + height: 40%; } .moonAnimation { - display: flex; - flex-direction: column; - justify-content: flex-start; - left: 0px; - top: 0px; - width: 100%; - height: 40%; + display: flex; + flex-direction: column; + justify-content: flex-start; + left: 0px; + top: 0px; + width: 100%; + height: 40%; } .image-sun { - width: 160px; - height: 120vp; - object-fit: contain; + width: 160px; + height: 120vp; + object-fit: contain; } .image-moon { - width: 120px; - height: 120vp; - object-fit: contain; + width: 120px; + height: 120vp; + object-fit: contain; } .divider { - height: 2%; + height: 2%; } .div-button { - height: 15%; - width: 100%; - flex-direction: row; - justify-content: space-around; - align-items: center; + height: 15%; + width: 100%; + flex-direction: row; + justify-content: space-around; + align-items: center; } .button { - height: 100%; - width: 150px; + height: 100%; + width: 150px; } .image-button { - object-fit: contain; + object-fit: contain; } .button-reverse { - height: 100%; - width: 135px; + height: 100%; + width: 135px; } diff --git a/UI/JsAnimator/package.json b/UI/JsAnimator/package.json index e99223849..a3a7d0b10 100644 --- a/UI/JsAnimator/package.json +++ b/UI/JsAnimator/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "^1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/UI/JsBasicComponents/.gitignore b/UI/JsBasicComponents/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsBasicComponents/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsBrightness/.gitignore b/UI/JsBrightness/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsBrightness/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsBrightness/README_zh.md b/UI/JsBrightness/README_zh.md index 1b9e0055e..cb4205e23 100644 --- a/UI/JsBrightness/README_zh.md +++ b/UI/JsBrightness/README_zh.md @@ -22,5 +22,5 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 diff --git a/UI/JsBrightness/entry/src/main/js/default/app.js b/UI/JsBrightness/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/UI/JsBrightness/entry/src/main/js/default/app.js +++ b/UI/JsBrightness/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/UI/JsBrightness/entry/src/main/js/default/pages/index/index.hml b/UI/JsBrightness/entry/src/main/js/default/pages/index/index.hml index f5428ebc1..9dd0e24a1 100644 --- a/UI/JsBrightness/entry/src/main/js/default/pages/index/index.hml +++ b/UI/JsBrightness/entry/src/main/js/default/pages/index/index.hml @@ -14,10 +14,10 @@ -->
- {{ $t('strings.tip') }} -
- {{ $t('strings.dark') }} - - {{ $t('strings.bright') }} -
+ {{ $t('strings.tip') }} +
+ {{ $t('strings.dark') }} + + {{ $t('strings.bright') }} +
\ No newline at end of file diff --git a/UI/JsBrightness/entry/src/main/js/default/pages/index/index.js b/UI/JsBrightness/entry/src/main/js/default/pages/index/index.js index c20db2c0e..c504d7647 100644 --- a/UI/JsBrightness/entry/src/main/js/default/pages/index/index.js +++ b/UI/JsBrightness/entry/src/main/js/default/pages/index/index.js @@ -16,13 +16,13 @@ import brightness from '@ohos.brightness'; export default { - data: { - defaultValue: 125 - }, - onInit() { - brightness.setValue(this.defaultValue); - }, - brightness(e) { - brightness.setValue(e.value); - } + data: { + defaultValue: 125 + }, + onInit() { + brightness.setValue(this.defaultValue); + }, + brightness(e) { + brightness.setValue(e.value); + } } \ No newline at end of file diff --git a/UI/JsBrightness/package.json b/UI/JsBrightness/package.json index 5fe0a3efa..64b02ffde 100644 --- a/UI/JsBrightness/package.json +++ b/UI/JsBrightness/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor": "1.1.3", - "@ohos/hvigor-ohos-plugin": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor": "1.1.6", + "@ohos/hvigor-ohos-plugin": "1.1.6" } } diff --git a/UI/JsCanvas/.gitignore b/UI/JsCanvas/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsCanvas/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsCanvas/README_zh.md b/UI/JsCanvas/README_zh.md index 49444944d..3fd77cf42 100644 --- a/UI/JsCanvas/README_zh.md +++ b/UI/JsCanvas/README_zh.md @@ -40,4 +40,4 @@ Canvas:提供画布组件,用于自定义绘制图形。 1.本示例仅支持标准系统运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/UI/JsCanvas/entry/src/main/js/default/app.js b/UI/JsCanvas/entry/src/main/js/default/app.js index 8e47afff1..50007322f 100644 --- a/UI/JsCanvas/entry/src/main/js/default/app.js +++ b/UI/JsCanvas/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/JsCanvas/entry/src/main/js/default/pages/index/index.hml b/UI/JsCanvas/entry/src/main/js/default/pages/index/index.hml index ec7fc6f4e..dcc366037 100644 --- a/UI/JsCanvas/entry/src/main/js/default/pages/index/index.hml +++ b/UI/JsCanvas/entry/src/main/js/default/pages/index/index.hml @@ -13,29 +13,32 @@ limitations under the License. -->
-
+
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
+
+ + +
+
+ + + +
+
+ + +
+
+ + + + +
+
+ + +
-
+
diff --git a/UI/JsCanvas/entry/src/main/js/default/pages/index/index.js b/UI/JsCanvas/entry/src/main/js/default/pages/index/index.js index 197645a9f..e883045d4 100644 --- a/UI/JsCanvas/entry/src/main/js/default/pages/index/index.js +++ b/UI/JsCanvas/entry/src/main/js/default/pages/index/index.js @@ -14,128 +14,128 @@ */ export default { - data: { - ctx: null - }, - onShow() { - const cav = this.$refs.canvas; - this.ctx = cav.getContext('2d'); - }, - imageClick() { - this.ctx.clearRect(0, 0, 300, 300); - var ctx1 = this.$element('drawImage').getContext('2d'); - var img = new Image(); - img.src = 'common/images/like_yellow.png'; - img.onload = function () { - console.log('Image load success'); - ctx1.drawImage(img, 50, 50, 200, 200); - }; - img.onerror = function () { - console.log('Image load fail'); - }; - }, - handleClick() { - this.ctx.beginPath(); - this.ctx.arc(150, 150, 50, 0, 6.28); - this.ctx.stroke(); - }, - strokeClick() { - this.ctx.beginPath(); - this.ctx.font = '25px sans-serif'; - this.ctx.strokeText("Hello World!", 80, 60); - this.ctx.stroke(); - }, - closeClick() { - this.ctx.beginPath(); - this.ctx.lineJoin = 'miter'; - this.ctx.moveTo(150, 200); - this.ctx.lineTo(120, 150); - this.ctx.lineTo(150, 100); - this.ctx.lineTo(180, 150); + data: { + ctx: null + }, + onShow() { + const cav = this.$refs.canvas; + this.ctx = cav.getContext('2d'); + }, + imageClick() { + this.ctx.clearRect(0, 0, 300, 300); + var ctx1 = this.$element('drawImage').getContext('2d'); + var img = new Image(); + img.src = 'common/images/like_yellow.png'; + img.onload = function () { + console.log('Image load success'); + ctx1.drawImage(img, 50, 50, 200, 200); + }; + img.onerror = function () { + console.log('Image load fail'); + }; + }, + handleClick() { + this.ctx.beginPath(); + this.ctx.arc(150, 150, 50, 0, 6.28); + this.ctx.stroke(); + }, + strokeClick() { + this.ctx.beginPath(); + this.ctx.font = '25px sans-serif'; + this.ctx.strokeText("Hello World!", 80, 60); + this.ctx.stroke(); + }, + closeClick() { + this.ctx.beginPath(); + this.ctx.lineJoin = 'miter'; + this.ctx.moveTo(150, 200); + this.ctx.lineTo(120, 150); + this.ctx.lineTo(150, 100); + this.ctx.lineTo(180, 150); - this.ctx.closePath(); - this.ctx.stroke(); - }, - bezierCurve() { - this.ctx.beginPath(); - this.ctx.moveTo(10, 10); - this.ctx.bezierCurveTo(90, 100, 200, 100, 290, 10); - this.ctx.stroke(); - }, - clearRect() { - this.ctx.fillStyle = '#000000' - this.ctx.clearRect(0, 0, 300, 300); - }, - textBase() { - this.ctx.beginPath(); - this.ctx.moveTo(0, 220); - this.ctx.lineTo(300, 220); + this.ctx.closePath(); + this.ctx.stroke(); + }, + bezierCurve() { + this.ctx.beginPath(); + this.ctx.moveTo(10, 10); + this.ctx.bezierCurveTo(90, 100, 200, 100, 290, 10); + this.ctx.stroke(); + }, + clearRect() { + this.ctx.fillStyle = '#000000' + this.ctx.clearRect(0, 0, 300, 300); + }, + textBase() { + this.ctx.beginPath(); + this.ctx.moveTo(0, 220); + this.ctx.lineTo(300, 220); - this.ctx.stroke(); + this.ctx.stroke(); - this.ctx.font = '20px sans-serif'; - this.ctx.strokeStyle = '#100f0f'; - this.ctx.textBaseline = 'top'; - this.ctx.fillText('Top', 10, 220); - this.ctx.textBaseline = 'bottom'; - this.ctx.fillText('Bottom', 55, 220); - this.ctx.textBaseline = 'middle'; - this.ctx.fillText('Middle', 125, 220); - this.ctx.textBaseline = 'alphabetic'; - this.ctx.fillText('Alphabetic', 195, 220); - }, - offScreen() { - var offscreen = new OffscreenCanvas(360, 500); - var offCanvas2 = offscreen.getContext("2d"); - var img = new Image(); - img.src = 'common/images/ai.png'; - offCanvas2.drawImage(img, 0, 0, 100, 100); - offCanvas2.filter = 'blur(5px)'; - offCanvas2.drawImage(img, 100, 0, 100, 100); + this.ctx.font = '20px sans-serif'; + this.ctx.strokeStyle = '#100f0f'; + this.ctx.textBaseline = 'top'; + this.ctx.fillText('Top', 10, 220); + this.ctx.textBaseline = 'bottom'; + this.ctx.fillText('Bottom', 55, 220); + this.ctx.textBaseline = 'middle'; + this.ctx.fillText('Middle', 125, 220); + this.ctx.textBaseline = 'alphabetic'; + this.ctx.fillText('Alphabetic', 195, 220); + }, + offScreen() { + var offscreen = new OffscreenCanvas(360, 500); + var offCanvas2 = offscreen.getContext("2d"); + var img = new Image(); + img.src = 'common/images/ai.png'; + offCanvas2.drawImage(img, 0, 0, 100, 100); + offCanvas2.filter = 'blur(5px)'; + offCanvas2.drawImage(img, 100, 0, 100, 100); - offCanvas2.filter = 'grayscale(50%)'; - offCanvas2.drawImage(img, 200, 0, 100, 100); + offCanvas2.filter = 'grayscale(50%)'; + offCanvas2.drawImage(img, 200, 0, 100, 100); - offCanvas2.filter = 'hue-rotate(90deg)'; - offCanvas2.drawImage(img, 0, 100, 100, 100); + offCanvas2.filter = 'hue-rotate(90deg)'; + offCanvas2.drawImage(img, 0, 100, 100, 100); - offCanvas2.filter = 'invert(100%)'; - offCanvas2.drawImage(img, 100, 100, 100, 100); + offCanvas2.filter = 'invert(100%)'; + offCanvas2.drawImage(img, 100, 100, 100, 100); - offCanvas2.filter = 'drop-shadow(8px 8px 10px green)'; - offCanvas2.drawImage(img, 200, 100, 100, 100); + offCanvas2.filter = 'drop-shadow(8px 8px 10px green)'; + offCanvas2.drawImage(img, 200, 100, 100, 100); - offCanvas2.filter = 'brightness(0.4)'; - offCanvas2.drawImage(img, 0, 200, 100, 100); + offCanvas2.filter = 'brightness(0.4)'; + offCanvas2.drawImage(img, 0, 200, 100, 100); - offCanvas2.filter = 'opacity(25%)'; - offCanvas2.drawImage(img, 100, 200, 100, 100); + offCanvas2.filter = 'opacity(25%)'; + offCanvas2.drawImage(img, 100, 200, 100, 100); - offCanvas2.filter = 'saturate(30%)'; - offCanvas2.drawImage(img, 200, 200, 100, 100); + offCanvas2.filter = 'saturate(30%)'; + offCanvas2.drawImage(img, 200, 200, 100, 100); - offCanvas2.filter = 'sepia(60%)'; - offCanvas2.drawImage(img, 0, 300, 100, 100); + offCanvas2.filter = 'sepia(60%)'; + offCanvas2.drawImage(img, 0, 300, 100, 100); - offCanvas2.filter = 'contrast(200%)'; - offCanvas2.drawImage(img, 100, 300, 100, 100); - var bitmap = offscreen.transferToImageBitmap(); - this.ctx.transferFromImageBitmap(bitmap); - }, - linearGradient() { - var gradient = this.ctx.createLinearGradient(50, 0, 300, 100); - gradient.addColorStop(0.0, 'red'); - gradient.addColorStop(0.5, 'white'); - gradient.addColorStop(1.0, 'green'); - this.ctx.fillStyle = gradient; - this.ctx.fillRect(0, 0, 500, 500); - }, - radialGradient() { - var gradient = this.ctx.createRadialGradient(150, 150, 50, 150, 150, 150); - gradient.addColorStop(0.0, 'red'); - gradient.addColorStop(0.5, 'white'); - gradient.addColorStop(1.0, 'green'); - this.ctx.fillStyle = gradient; - this.ctx.fillRect(0, 0, 500, 500); - } + offCanvas2.filter = 'contrast(200%)'; + offCanvas2.drawImage(img, 100, 300, 100, 100); + var bitmap = offscreen.transferToImageBitmap(); + this.ctx.transferFromImageBitmap(bitmap); + }, + linearGradient() { + var gradient = this.ctx.createLinearGradient(50, 0, 300, 100); + gradient.addColorStop(0.0, 'red'); + gradient.addColorStop(0.5, 'white'); + gradient.addColorStop(1.0, 'green'); + this.ctx.fillStyle = gradient; + this.ctx.fillRect(0, 0, 500, 500); + }, + radialGradient() { + var gradient = this.ctx.createRadialGradient(150, 150, 50, 150, 150, 150); + gradient.addColorStop(0.0, 'red'); + gradient.addColorStop(0.5, 'white'); + gradient.addColorStop(1.0, 'green'); + this.ctx.fillStyle = gradient; + this.ctx.fillRect(0, 0, 500, 500); + } } diff --git a/UI/JsCanvas/package.json b/UI/JsCanvas/package.json index de25679ec..83b997dd3 100644 --- a/UI/JsCanvas/package.json +++ b/UI/JsCanvas/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/JsDevice/.gitignore b/UI/JsDevice/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsDevice/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsDevice/README_zh.md b/UI/JsDevice/README_zh.md index fd4235144..fd87b0dda 100644 --- a/UI/JsDevice/README_zh.md +++ b/UI/JsDevice/README_zh.md @@ -24,4 +24,4 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 diff --git a/UI/JsDevice/entry/src/main/js/default/app.js b/UI/JsDevice/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/UI/JsDevice/entry/src/main/js/default/app.js +++ b/UI/JsDevice/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/UI/JsDevice/entry/src/main/js/default/common/common.css b/UI/JsDevice/entry/src/main/js/default/common/common.css index b32bf06f2..c82f2c6fd 100644 --- a/UI/JsDevice/entry/src/main/js/default/common/common.css +++ b/UI/JsDevice/entry/src/main/js/default/common/common.css @@ -20,7 +20,7 @@ align-items: center; } -.title-box{ +.title-box { flex-direction: row; width: 100%; height: 90px; diff --git a/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.hml b/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.hml index 9a20e637c..646028d68 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.hml +++ b/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.hml @@ -14,14 +14,14 @@ -->
-
- {{ $t('strings.batteryInfo_title') }} -
- {{ $t('strings.batterySOC') }}: {{ batterySOC }} - {{ $t('strings.chargingStatus') }}: {{ chargingStatus }} - {{ $t('strings.healthStatus') }}: {{ healthStatus }} - {{ $t('strings.pluggedType') }}: {{ pluggedType }} - {{ $t('strings.voltage') }}: {{ voltage }} - {{ $t('strings.technology') }}: {{ technology }} - {{ $t('strings.batteryTemperature') }}: {{ batteryTemperature }} +
+ {{ $t('strings.batteryInfo_title') }} +
+ {{ $t('strings.batterySOC') }}: {{ batterySOC }} + {{ $t('strings.chargingStatus') }}: {{ chargingStatus }} + {{ $t('strings.healthStatus') }}: {{ healthStatus }} + {{ $t('strings.pluggedType') }}: {{ pluggedType }} + {{ $t('strings.voltage') }}: {{ voltage }} + {{ $t('strings.technology') }}: {{ technology }} + {{ $t('strings.batteryTemperature') }}: {{ batteryTemperature }}
diff --git a/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.js b/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.js index 76139d85a..1418ed5fe 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.js +++ b/UI/JsDevice/entry/src/main/js/default/pages/batteryInfo/batteryInfo.js @@ -17,79 +17,79 @@ import router from '@ohos.router'; import batteryInfo from '@ohos.batteryInfo'; export default { - data: { - batterySOC: '', - chargingStatus: '', - healthStatus: '', - pluggedType: '', - voltage: '', - technology: '', - batteryTemperature: '' - }, - onInit() { - this.batteryInfo(); - }, - batteryInfo() { - this.batterySOC = batteryInfo.batterySOC; - switch (batteryInfo.chargingStatus) { - case 0: - this.chargingStatus = this.$t('strings.none'); - break; - case 1: - this.chargingStatus = this.$t('strings.enable'); - break; - case 2: - this.chargingStatus = this.$t('strings.disable'); - break; - case 3: - this.chargingStatus = this.$t('strings.full'); - break; - default: - break; - } - switch (batteryInfo.healthStatus) { - case 0: - this.healthStatus = this.$t('strings.unknown'); - break; - case 1: - this.healthStatus = this.$t('strings.good'); - break; - case 2: - this.healthStatus = this.$t('strings.overheat'); - break; - case 3: - this.healthStatus = this.$t('strings.overVoltage'); - break; - case 4: - this.healthStatus = this.$t('strings.cold'); - break; - case 5: - this.healthStatus = this.$t('strings.dead'); - break; - default: - break; - } - switch (batteryInfo.pluggedType) { - case 0: - this.pluggedType = this.$t('strings.none'); - break; - case 1: - this.pluggedType = this.$t('strings.ac'); - break; - case 2: - this.pluggedType = this.$t('strings.usb'); - break; - case 3: - this.pluggedType = this.$t('strings.wireless'); - break; - default: - break; - } - this.voltage = batteryInfo.voltage; - this.technology = batteryInfo.technology; - this.batteryTemperature = batteryInfo.batteryTemperature; - }, - back() { - router.back(); + data: { + batterySOC: '', + chargingStatus: '', + healthStatus: '', + pluggedType: '', + voltage: '', + technology: '', + batteryTemperature: '' + }, + onInit() { + this.batteryInfo(); + }, + batteryInfo() { + this.batterySOC = batteryInfo.batterySOC; + switch (batteryInfo.chargingStatus) { + case 0: + this.chargingStatus = this.$t('strings.none'); + break; + case 1: + this.chargingStatus = this.$t('strings.enable'); + break; + case 2: + this.chargingStatus = this.$t('strings.disable'); + break; + case 3: + this.chargingStatus = this.$t('strings.full'); + break; + default: + break; } + switch (batteryInfo.healthStatus) { + case 0: + this.healthStatus = this.$t('strings.unknown'); + break; + case 1: + this.healthStatus = this.$t('strings.good'); + break; + case 2: + this.healthStatus = this.$t('strings.overheat'); + break; + case 3: + this.healthStatus = this.$t('strings.overVoltage'); + break; + case 4: + this.healthStatus = this.$t('strings.cold'); + break; + case 5: + this.healthStatus = this.$t('strings.dead'); + break; + default: + break; + } + switch (batteryInfo.pluggedType) { + case 0: + this.pluggedType = this.$t('strings.none'); + break; + case 1: + this.pluggedType = this.$t('strings.ac'); + break; + case 2: + this.pluggedType = this.$t('strings.usb'); + break; + case 3: + this.pluggedType = this.$t('strings.wireless'); + break; + default: + break; + } + this.voltage = batteryInfo.voltage; + this.technology = batteryInfo.technology; + this.batteryTemperature = batteryInfo.batteryTemperature; + }, + back() { + router.back(); + } } diff --git a/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.hml b/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.hml index 2d1e1039a..ceb752fe6 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.hml +++ b/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.hml @@ -14,20 +14,20 @@ -->
-
- {{ $t('strings.deviceInfo_title') }} -
- {{ $t('strings.serial') }}: {{ serial }} - {{ $t('strings.bootloaderVersion') }}: {{ bootloaderVersion }} - {{ $t('strings.securityPatchTag') }}: {{ securityPatchTag }} - {{ $t('strings.displayVersion') }}: {{ displayVersion }} - {{ $t('strings.osReleaseType') }}: {{ osReleaseType }} - {{ $t('strings.osFullName') }}: {{ osFullName }} - {{ $t('strings.majorVersion') }}: {{ majorVersion }} - {{ $t('strings.seniorVersion') }}: {{ seniorVersion }} - {{ $t('strings.featureVersion') }}: {{ featureVersion }} - {{ $t('strings.buildVersion') }}: {{ buildVersion }} - {{ $t('strings.sdkApiVersion') }}: {{ sdkApiVersion }} - {{ $t('strings.firstApiVersion') }}: {{ firstApiVersion }} - {{ $t('strings.versionId') }}: {{ versionId }} +
+ {{ $t('strings.deviceInfo_title') }} +
+ {{ $t('strings.serial') }}: {{ serial }} + {{ $t('strings.bootloaderVersion') }}: {{ bootloaderVersion }} + {{ $t('strings.securityPatchTag') }}: {{ securityPatchTag }} + {{ $t('strings.displayVersion') }}: {{ displayVersion }} + {{ $t('strings.osReleaseType') }}: {{ osReleaseType }} + {{ $t('strings.osFullName') }}: {{ osFullName }} + {{ $t('strings.majorVersion') }}: {{ majorVersion }} + {{ $t('strings.seniorVersion') }}: {{ seniorVersion }} + {{ $t('strings.featureVersion') }}: {{ featureVersion }} + {{ $t('strings.buildVersion') }}: {{ buildVersion }} + {{ $t('strings.sdkApiVersion') }}: {{ sdkApiVersion }} + {{ $t('strings.firstApiVersion') }}: {{ firstApiVersion }} + {{ $t('strings.versionId') }}: {{ versionId }}
diff --git a/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.js b/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.js index db71ef788..0d72dcf91 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.js +++ b/UI/JsDevice/entry/src/main/js/default/pages/deviceInfo/deviceInfo.js @@ -17,42 +17,42 @@ import router from '@ohos.router' import deviceInfo from '@ohos.deviceInfo'; export default { - data: { - serial: '', - bootloaderVersion: '', - abiList: '', - securityPatchTag: '', - displayVersion: '', - osReleaseType: '', - osFullName: '', - majorVersion: '', - seniorVersion: '', - featureVersion: '', - buildVersion: '', - sdkApiVersion: '', - firstApiVersion: '', - versionId: '', - data1: '' - }, - onInit() { - this.deviceInfo(); - }, - deviceInfo() { - this.serial = deviceInfo.serial; - this.bootloaderVersion = deviceInfo.bootloaderVersion; - this.securityPatchTag = deviceInfo.securityPatchTag; - this.displayVersion = deviceInfo.displayVersion; - this.osReleaseType = deviceInfo.osReleaseType; - this.osFullName = deviceInfo.osFullName; - this.majorVersion = deviceInfo.majorVersion; - this.seniorVersion = deviceInfo.seniorVersion; - this.featureVersion = deviceInfo.featureVersion; - this.buildVersion = deviceInfo.buildVersion; - this.sdkApiVersion = deviceInfo.sdkApiVersion; - this.firstApiVersion = deviceInfo.firstApiVersion; - this.versionId = deviceInfo.versionId; - }, - back() { - router.back(); - } + data: { + serial: '', + bootloaderVersion: '', + abiList: '', + securityPatchTag: '', + displayVersion: '', + osReleaseType: '', + osFullName: '', + majorVersion: '', + seniorVersion: '', + featureVersion: '', + buildVersion: '', + sdkApiVersion: '', + firstApiVersion: '', + versionId: '', + data1: '' + }, + onInit() { + this.deviceInfo(); + }, + deviceInfo() { + this.serial = deviceInfo.serial; + this.bootloaderVersion = deviceInfo.bootloaderVersion; + this.securityPatchTag = deviceInfo.securityPatchTag; + this.displayVersion = deviceInfo.displayVersion; + this.osReleaseType = deviceInfo.osReleaseType; + this.osFullName = deviceInfo.osFullName; + this.majorVersion = deviceInfo.majorVersion; + this.seniorVersion = deviceInfo.seniorVersion; + this.featureVersion = deviceInfo.featureVersion; + this.buildVersion = deviceInfo.buildVersion; + this.sdkApiVersion = deviceInfo.sdkApiVersion; + this.firstApiVersion = deviceInfo.firstApiVersion; + this.versionId = deviceInfo.versionId; + }, + back() { + router.back(); + } } \ No newline at end of file diff --git a/UI/JsDevice/entry/src/main/js/default/pages/index/index.css b/UI/JsDevice/entry/src/main/js/default/pages/index/index.css index 01a3d082c..c11dda5a0 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/index/index.css +++ b/UI/JsDevice/entry/src/main/js/default/pages/index/index.css @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2021 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. + */ + .container { display: flex; flex-direction: column; diff --git a/UI/JsDevice/entry/src/main/js/default/pages/index/index.hml b/UI/JsDevice/entry/src/main/js/default/pages/index/index.hml index ac8f48b3e..4b6bb32d9 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/index/index.hml +++ b/UI/JsDevice/entry/src/main/js/default/pages/index/index.hml @@ -1,5 +1,20 @@ +/* + * Copyright (c) 2021 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. + */ +
- - - + + +
diff --git a/UI/JsDevice/entry/src/main/js/default/pages/index/index.js b/UI/JsDevice/entry/src/main/js/default/pages/index/index.js index d748a7a2c..119a9a436 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/index/index.js +++ b/UI/JsDevice/entry/src/main/js/default/pages/index/index.js @@ -1,19 +1,34 @@ +/* + * Copyright (c) 2021 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. + */ + import router from '@ohos.router' export default { - deviceInfo() { - router.push({ - url: 'pages/deviceInfo/deviceInfo' - }) - }, - systemProperties() { - router.push({ - url: 'pages/systemProperties/systemProperties' - }) - }, - batteryInfo() { - router.push({ - url: 'pages/batteryInfo/batteryInfo' - }) - } + deviceInfo() { + router.push({ + url: 'pages/deviceInfo/deviceInfo' + }) + }, + systemProperties() { + router.push({ + url: 'pages/systemProperties/systemProperties' + }) + }, + batteryInfo() { + router.push({ + url: 'pages/batteryInfo/batteryInfo' + }) + } } \ No newline at end of file diff --git a/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.css b/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.css index fe2ae24f6..fa5656187 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.css +++ b/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.css @@ -23,6 +23,7 @@ margin: 20px; padding: 20px; } + .button-row { flex-direction: row; align-items: center; diff --git a/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.hml b/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.hml index e00bf588f..76c113b1b 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.hml +++ b/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.hml @@ -14,23 +14,23 @@ -->
-
- {{ $t('strings.systemProperties_title') }} -
- {{ $t('strings.results') }}: {{ results }} -
- - -
-
- - -
-
- - -
-
- -
+
+ {{ $t('strings.systemProperties_title') }} +
+ {{ $t('strings.results') }}: {{ results }} +
+ + +
+
+ + +
+
+ + +
+
+ +
diff --git a/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.js b/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.js index 66266ddd3..1b64ef7c6 100644 --- a/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.js +++ b/UI/JsDevice/entry/src/main/js/default/pages/systemProperties/systemProperties.js @@ -19,110 +19,110 @@ import systemParameter from '@ohos.systemParameter'; let self = null export default { - data: { - results: '' - }, - onInit() { - self = this - }, - setKey() { - try { - var promise = systemParameter.set("test.parameter.key", "testValue"); - promise.then(function (data) { - self.results = "setKey pass"; - console.log("set test.parameter.key success" + data); - }).catch(function (err) { - self.results = "set test.parameter.key error" + err.code; - console.log("set test.parameter.key error" + err.code); - }); - } catch (e) { - self.results = "set unexpected error:" + e; - console.log("set unexpected error:" + e); - } - }, - getKey() { - try { - var promise = systemParameter.get("test.parameter.key", "default"); - promise.then(function (data) { - self.results = "getKey pass"; - console.log("get test.parameter.key success:" + JSON.stringify(data)); - }).catch(function (err) { - self.results = "get test.parameter.key error:" + err.code; - console.log("get test.parameter.key error:" + err.code); - }); - } catch (e) { - self.results = "get unexpected error:" + e; - console.log("get unexpected error:" + e); - } - }, - setSync() { - try { - systemParameter.setSync("test.parameter.key", "testValue"); - this.results = "setSync pass"; - } catch (e) { - this.results = "setSync unexpected error:" + e; - console.log("setSync unexpected error:" + e); - } - }, - getSync() { - try { - var getSync = systemParameter.getSync("test.parameter.key", "default"); - console.log("getSync test.parameter.key value success:" + JSON.stringify(getSync)); - this.results = "getSync pass"; - } catch (e) { - this.results = "getSync unexpected error:" + e; - console.log("getSync unexpected error"); - } - }, - setASyncCallback() { - try { - systemParameter.set("test.parameter.key", "testValue", function (err, data) { - if (err == undefined) { - self.results = "setASyncCallback pass" - console.log("set test.parameter.key value success:" + data); - } else { - self.results = "set test.parameter.key value err:" + err.code; - console.log("set test.parameter.key value err:" + err.code); - } - }); - } catch (e) { - self.results = "set unexpected error:" + e; - console.log("set unexpected error:" + e); + data: { + results: '' + }, + onInit() { + self = this + }, + setKey() { + try { + var promise = systemParameter.set("test.parameter.key", "testValue"); + promise.then(function (data) { + self.results = "setKey pass"; + console.log("set test.parameter.key success" + data); + }).catch(function (err) { + self.results = "set test.parameter.key error" + err.code; + console.log("set test.parameter.key error" + err.code); + }); + } catch (e) { + self.results = "set unexpected error:" + e; + console.log("set unexpected error:" + e); + } + }, + getKey() { + try { + var promise = systemParameter.get("test.parameter.key", "default"); + promise.then(function (data) { + self.results = "getKey pass"; + console.log("get test.parameter.key success:" + JSON.stringify(data)); + }).catch(function (err) { + self.results = "get test.parameter.key error:" + err.code; + console.log("get test.parameter.key error:" + err.code); + }); + } catch (e) { + self.results = "get unexpected error:" + e; + console.log("get unexpected error:" + e); + } + }, + setSync() { + try { + systemParameter.setSync("test.parameter.key", "testValue"); + this.results = "setSync pass"; + } catch (e) { + this.results = "setSync unexpected error:" + e; + console.log("setSync unexpected error:" + e); + } + }, + getSync() { + try { + var getSync = systemParameter.getSync("test.parameter.key", "default"); + console.log("getSync test.parameter.key value success:" + JSON.stringify(getSync)); + this.results = "getSync pass"; + } catch (e) { + this.results = "getSync unexpected error:" + e; + console.log("getSync unexpected error"); + } + }, + setASyncCallback() { + try { + systemParameter.set("test.parameter.key", "testValue", function (err, data) { + if (err == undefined) { + self.results = "setASyncCallback pass" + console.log("set test.parameter.key value success:" + data); + } else { + self.results = "set test.parameter.key value err:" + err.code; + console.log("set test.parameter.key value err:" + err.code); } - }, - getAsyncCallback() { - try { - systemParameter.get("test.parameter.key", function (err, data) { - if (err == undefined) { - self.results = "getAsyncCallback pass"; - console.log("get test.parameter.key value success:" + data); - } else { - self.results = "get test.parameter.key value err:" + err.code; - console.log("get test.parameter.key value err:" + err.code); - } - }); - } catch (e) { - self.results = "getSync unexpected error:" + e; - console.log("getSync unexpected error:" + e); + }); + } catch (e) { + self.results = "set unexpected error:" + e; + console.log("set unexpected error:" + e); + } + }, + getAsyncCallback() { + try { + systemParameter.get("test.parameter.key", function (err, data) { + if (err == undefined) { + self.results = "getAsyncCallback pass"; + console.log("get test.parameter.key value success:" + data); + } else { + self.results = "get test.parameter.key value err:" + err.code; + console.log("get test.parameter.key value err:" + err.code); } - }, - getDefAsyncCallback() { - try { - systemParameter.get("test.parameter.key", "default", function (err, data) { - if (err == undefined) { - self.results = "getDefAsyncCallback pass"; - console.log("get test.parameter.key value success:" + data); - } else { - self.results = "get test.parameter.key value err:" + err.code; - console.log("get test.parameter.key value err:" + err.code); - } - }); - } catch (e) { - self.results = "get test.parameter.key value err:" + e; - console.log("get test.parameter.key value err:" + e); + }); + } catch (e) { + self.results = "getSync unexpected error:" + e; + console.log("getSync unexpected error:" + e); + } + }, + getDefAsyncCallback() { + try { + systemParameter.get("test.parameter.key", "default", function (err, data) { + if (err == undefined) { + self.results = "getDefAsyncCallback pass"; + console.log("get test.parameter.key value success:" + data); + } else { + self.results = "get test.parameter.key value err:" + err.code; + console.log("get test.parameter.key value err:" + err.code); } - }, - back() { - router.back(); + }); + } catch (e) { + self.results = "get test.parameter.key value err:" + e; + console.log("get test.parameter.key value err:" + e); } + }, + back() { + router.back(); + } } \ No newline at end of file diff --git a/UI/JsDevice/package.json b/UI/JsDevice/package.json index 49e4c0947..1d823ce9d 100644 --- a/UI/JsDevice/package.json +++ b/UI/JsDevice/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/UI/JsDialog/.gitignore b/UI/JsDialog/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/JsDialog/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/JsDialog/README_zh.md b/UI/JsDialog/README_zh.md index 442dfa92d..34dd42c26 100644 --- a/UI/JsDialog/README_zh.md +++ b/UI/JsDialog/README_zh.md @@ -24,4 +24,4 @@ JS中支持用户自定义弹窗,组件作为容器组件,用户可 1.本示例支持标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 diff --git a/UI/JsDialog/entry/src/main/js/default/app.js b/UI/JsDialog/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/UI/JsDialog/entry/src/main/js/default/app.js +++ b/UI/JsDialog/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/UI/JsDialog/entry/src/main/js/default/pages/index/index.hml b/UI/JsDialog/entry/src/main/js/default/pages/index/index.hml index 05882115d..5711cf039 100644 --- a/UI/JsDialog/entry/src/main/js/default/pages/index/index.hml +++ b/UI/JsDialog/entry/src/main/js/default/pages/index/index.hml @@ -14,62 +14,62 @@ -->
-
- {{ $t('strings.title') }} - {{ $t('strings.add') }} -
- - - -
-
-
- {{ $t('strings.name') }} - {{ $item.name }} -
-
- {{ $t('strings.phone') }} - {{ $item.phone }} -
-
- {{ $t('strings.delete') }} - -
-
-
- - - {{ $t('strings.tips') }} - -
- -
- {{ $t('strings.delete_tips') }} -
- - - -
-
-
- -
-
- {{ $t('strings.name') }} - {{ name }} +
+ {{ $t('strings.title') }} + {{ $t('strings.add') }} +
+ + + +
+
+
+ {{ $t('strings.name') }} + {{ $item.name }}
-
- {{ $t('strings.phone') }} - {{ phone }} -
-
- - - +
+ {{ $t('strings.phone') }} + {{ $item.phone }}
+
+ {{ $t('strings.delete') }} +
-
+ + + + + {{ $t('strings.tips') }} + + + +
+ {{ $t('strings.delete_tips') }} +
+ + + +
+
+
+ +
+
+ {{ $t('strings.name') }} + {{ name }} +
+
+ {{ $t('strings.phone') }} + {{ phone }} +
+
+ + + +
+
+
diff --git a/UI/JsDialog/entry/src/main/js/default/pages/index/index.js b/UI/JsDialog/entry/src/main/js/default/pages/index/index.js index a50135089..a48ed056f 100644 --- a/UI/JsDialog/entry/src/main/js/default/pages/index/index.js +++ b/UI/JsDialog/entry/src/main/js/default/pages/index/index.js @@ -14,48 +14,48 @@ */ export default { - data: { - listItem: [], - showTips: true, - name: '', - phone: '17700000000', - num: 0, - deleteItem: null - }, - onclick: function () { - this.name = this.$t('strings.contact') + this.num - this.$element('showDialog').show(); - }, - showDeleteDialog: function (object) { - console.info('delete:' + JSON.stringify(object)) - this.deleteItem = object - this.$element('deleteDialog').show(); - }, - cancelDeleteDialog: function () { - this.deleteItem = null - this.$element('deleteDialog').close(); - }, - cancelDialog: function () { - this.$element('showDialog').close(); - }, - onConfirm: function () { - this.num += 1 - this.listItem.push({ - 'name': this.name, 'phone': this.phone - }) - this.showTips = false - this.$element('showDialog').close(); - }, - onDeleteSure: function () { - var index = this.listItem.indexOf(this.deleteItem) - console.info('index=' + index) - this.listItem.splice(index, 1) - if (this.listItem.length === 0) { - this.num = 0 - this.showTips = true - } - this.$element('deleteDialog').close(); + data: { + listItem: [], + showTips: true, + name: '', + phone: '17700000000', + num: 0, + deleteItem: null + }, + onclick: function () { + this.name = this.$t('strings.contact') + this.num + this.$element('showDialog').show(); + }, + showDeleteDialog: function (object) { + console.info('delete:' + JSON.stringify(object)) + this.deleteItem = object + this.$element('deleteDialog').show(); + }, + cancelDeleteDialog: function () { + this.deleteItem = null + this.$element('deleteDialog').close(); + }, + cancelDialog: function () { + this.$element('showDialog').close(); + }, + onConfirm: function () { + this.num += 1 + this.listItem.push({ + 'name': this.name, 'phone': this.phone + }) + this.showTips = false + this.$element('showDialog').close(); + }, + onDeleteSure: function () { + var index = this.listItem.indexOf(this.deleteItem) + console.info('index=' + index) + this.listItem.splice(index, 1) + if (this.listItem.length === 0) { + this.num = 0 + this.showTips = true } + this.$element('deleteDialog').close(); + } } diff --git a/UI/JsDialog/package.json b/UI/JsDialog/package.json index 65f095238..5b989f73f 100644 --- a/UI/JsDialog/package.json +++ b/UI/JsDialog/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/UI/chart/.gitignore b/UI/chart/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/UI/chart/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/UI/chart/README_zh.md b/UI/chart/README_zh.md index ea2202a51..02957c446 100644 --- a/UI/chart/README_zh.md +++ b/UI/chart/README_zh.md @@ -24,6 +24,6 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行 diff --git a/UI/chart/entry/package.json b/UI/chart/entry/package.json index 459f5f8dc..48ec2fafe 100644 --- a/UI/chart/entry/package.json +++ b/UI/chart/entry/package.json @@ -11,4 +11,4 @@ "repository": {}, "version": "1.0.0", "dependencies": {} -} \ No newline at end of file +} diff --git a/UI/chart/entry/src/main/js/default/app.js b/UI/chart/entry/src/main/js/default/app.js index 8e47afff1..50007322f 100644 --- a/UI/chart/entry/src/main/js/default/app.js +++ b/UI/chart/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } }; diff --git a/UI/chart/entry/src/main/js/default/pages/bar/index.css b/UI/chart/entry/src/main/js/default/pages/bar/index.css index 00e94fc6c..44f7f2bf2 100644 --- a/UI/chart/entry/src/main/js/default/pages/bar/index.css +++ b/UI/chart/entry/src/main/js/default/pages/bar/index.css @@ -13,7 +13,7 @@ * limitations under the License. */ - @import '../../common/common.css'; +@import '../../common/common.css'; .data-bar { width: 95%; diff --git a/UI/chart/entry/src/main/js/default/pages/bar/index.hml b/UI/chart/entry/src/main/js/default/pages/bar/index.hml index 4c3aae497..bc6959835 100644 --- a/UI/chart/entry/src/main/js/default/pages/bar/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/bar/index.hml @@ -14,5 +14,5 @@ -->
- +
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/bar/index.js b/UI/chart/entry/src/main/js/default/pages/bar/index.js index 82c60cc98..7d5f806d5 100644 --- a/UI/chart/entry/src/main/js/default/pages/bar/index.js +++ b/UI/chart/entry/src/main/js/default/pages/bar/index.js @@ -14,34 +14,34 @@ */ export default { - data: { - barData: [ - { - fillColor: '#f07826', - data: [763, 550, 551, 554, 731], - }, - { - fillColor: '#cce9ff', - data: [535, 776, 615, 444, 694], - }, - { - fillColor: '#ff88bb', - data: [673, 500, 574, 483, 702], - }, - ], - barOps: { - xAxis: { - min: 0, - max: 20, - display: true, - axisTick: 5, - }, - yAxis: { - min: 0, - max: 1000, - display: true, - axisTick: 10, - }, - }, - } + data: { + barData: [ + { + fillColor: '#f07826', + data: [763, 550, 551, 554, 731], + }, + { + fillColor: '#cce9ff', + data: [535, 776, 615, 444, 694], + }, + { + fillColor: '#ff88bb', + data: [673, 500, 574, 483, 702], + }, + ], + barOps: { + xAxis: { + min: 0, + max: 20, + display: true, + axisTick: 5, + }, + yAxis: { + min: 0, + max: 1000, + display: true, + axisTick: 10, + }, + }, + } } \ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/guage/index.css b/UI/chart/entry/src/main/js/default/pages/guage/index.css index 20b1bb1e5..ec56340e3 100644 --- a/UI/chart/entry/src/main/js/default/pages/guage/index.css +++ b/UI/chart/entry/src/main/js/default/pages/guage/index.css @@ -13,7 +13,7 @@ * limitations under the License. */ - @import '../../common/common.css'; +@import '../../common/common.css'; .gauge-region { height: 200px; diff --git a/UI/chart/entry/src/main/js/default/pages/guage/index.hml b/UI/chart/entry/src/main/js/default/pages/guage/index.hml index 498cc88cc..8b9c0bf82 100644 --- a/UI/chart/entry/src/main/js/default/pages/guage/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/guage/index.hml @@ -14,7 +14,7 @@ -->
-
- -
+
+ +
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/index/index.hml b/UI/chart/entry/src/main/js/default/pages/index/index.hml index 8efdb5817..ff3976d05 100644 --- a/UI/chart/entry/src/main/js/default/pages/index/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/index/index.hml @@ -14,10 +14,10 @@ -->
- - - - - - + + + + + +
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/index/index.js b/UI/chart/entry/src/main/js/default/pages/index/index.js index 6138068e8..3b6afc025 100644 --- a/UI/chart/entry/src/main/js/default/pages/index/index.js +++ b/UI/chart/entry/src/main/js/default/pages/index/index.js @@ -16,10 +16,10 @@ import router from '@ohos.router'; export default { - data: {}, - onClick(type) { - router.push({ - url: 'pages/' + type +'/index' - }) - } + data: {}, + onClick(type) { + router.push({ + url: 'pages/' + type + '/index' + }) + } } diff --git a/UI/chart/entry/src/main/js/default/pages/line/index.css b/UI/chart/entry/src/main/js/default/pages/line/index.css index 33b306ad5..af994d323 100644 --- a/UI/chart/entry/src/main/js/default/pages/line/index.css +++ b/UI/chart/entry/src/main/js/default/pages/line/index.css @@ -13,7 +13,7 @@ * limitations under the License. */ - @import '../../common/common.css'; +@import '../../common/common.css'; .chart-data { width: 100%; diff --git a/UI/chart/entry/src/main/js/default/pages/line/index.hml b/UI/chart/entry/src/main/js/default/pages/line/index.hml index 581690989..4076f96ae 100644 --- a/UI/chart/entry/src/main/js/default/pages/line/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/line/index.hml @@ -14,5 +14,5 @@ -->
- +
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/line/index.js b/UI/chart/entry/src/main/js/default/pages/line/index.js index 79f26436f..1837e5af6 100644 --- a/UI/chart/entry/src/main/js/default/pages/line/index.js +++ b/UI/chart/entry/src/main/js/default/pages/line/index.js @@ -14,107 +14,107 @@ */ export default { - data: { - lineData: [ - { - strokeColor: '#0081ff', - fillColor: '#cce5ff', - data: [ - { - value: 25, - description: "25", - textLocation: "top", - textColor: '#000000' - }, - { - value: 20, - description: "20", - textLocation: "bottom", - textColor: '#000000' - }, - { - value: 37, - description: "37", - textLocation: "top", - textColor: '#000000' - }, - { - value: 48, - description: "48", - textLocation: "top", - textColor: '#000000' - }, - { - value: 27, - description: "27", - textLocation: "bottom", - textColor: '#000000' - }, - { - value: 80, - description: "80", - textLocation: "top", - textColor: '#000000' - }, - { - value: 20, - description: "20", - textLocation: "bottom", - textColor: '#000000' - }, - { - value: 66, - description: "66", - textLocation: "top", - textColor: '#000000' - }, - { - value: 21, - description: "21", - textLocation: "bottom", - textColor: '#000000' - }, - { - value: 81, - description: "81", - textLocation: "top", - textColor: '#000000' - }, - ], - gradient: true, - } + data: { + lineData: [ + { + strokeColor: '#0081ff', + fillColor: '#cce5ff', + data: [ + { + value: 25, + description: "25", + textLocation: "top", + textColor: '#000000' + }, + { + value: 20, + description: "20", + textLocation: "bottom", + textColor: '#000000' + }, + { + value: 37, + description: "37", + textLocation: "top", + textColor: '#000000' + }, + { + value: 48, + description: "48", + textLocation: "top", + textColor: '#000000' + }, + { + value: 27, + description: "27", + textLocation: "bottom", + textColor: '#000000' + }, + { + value: 80, + description: "80", + textLocation: "top", + textColor: '#000000' + }, + { + value: 20, + description: "20", + textLocation: "bottom", + textColor: '#000000' + }, + { + value: 66, + description: "66", + textLocation: "top", + textColor: '#000000' + }, + { + value: 21, + description: "21", + textLocation: "bottom", + textColor: '#000000' + }, + { + value: 81, + description: "81", + textLocation: "top", + textColor: '#000000' + }, ], - lineOps: { - xAxis: { - min: 0, - max: 10, - axisTick: 10, - display: true, - }, - yAxis: { - min: 0, - max: 100, - axisTick: 20, - display: true, - }, - series: { - lineStyle: { - width: "3px", - smooth: true, - }, - headPoint: { - shape: "circle", - size: 5, - strokeWidth: 5, - fillColor: '#000000', - strokeColor: '#007aff', - display: true, - }, - loop: { - margin: 2, - gradient: true, - } - } + gradient: true, + } + ], + lineOps: { + xAxis: { + min: 0, + max: 10, + axisTick: 10, + display: true, + }, + yAxis: { + min: 0, + max: 100, + axisTick: 20, + display: true, + }, + series: { + lineStyle: { + width: "3px", + smooth: true, }, - } + headPoint: { + shape: "circle", + size: 5, + strokeWidth: 5, + fillColor: '#000000', + strokeColor: '#007aff', + display: true, + }, + loop: { + margin: 2, + gradient: true, + } + } + }, + } } \ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/loading/index.css b/UI/chart/entry/src/main/js/default/pages/loading/index.css index e0928b14f..778677361 100644 --- a/UI/chart/entry/src/main/js/default/pages/loading/index.css +++ b/UI/chart/entry/src/main/js/default/pages/loading/index.css @@ -13,7 +13,7 @@ * limitations under the License. */ - @import '../../common/common.css'; +@import '../../common/common.css'; .chart-data { width: 200px; diff --git a/UI/chart/entry/src/main/js/default/pages/loading/index.hml b/UI/chart/entry/src/main/js/default/pages/loading/index.hml index a773997ed..12b30c7d0 100644 --- a/UI/chart/entry/src/main/js/default/pages/loading/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/loading/index.hml @@ -14,5 +14,5 @@ -->
- +
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/loading/index.js b/UI/chart/entry/src/main/js/default/pages/loading/index.js index 601b567c3..92047bab9 100644 --- a/UI/chart/entry/src/main/js/default/pages/loading/index.js +++ b/UI/chart/entry/src/main/js/default/pages/loading/index.js @@ -14,9 +14,9 @@ */ export default { - data: { - segment: { - value: 100 - } + data: { + segment: { + value: 100 } + } } \ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/progress/index.css b/UI/chart/entry/src/main/js/default/pages/progress/index.css index e0928b14f..778677361 100644 --- a/UI/chart/entry/src/main/js/default/pages/progress/index.css +++ b/UI/chart/entry/src/main/js/default/pages/progress/index.css @@ -13,7 +13,7 @@ * limitations under the License. */ - @import '../../common/common.css'; +@import '../../common/common.css'; .chart-data { width: 200px; diff --git a/UI/chart/entry/src/main/js/default/pages/progress/index.hml b/UI/chart/entry/src/main/js/default/pages/progress/index.hml index 34bf424e2..60ac1a33f 100644 --- a/UI/chart/entry/src/main/js/default/pages/progress/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/progress/index.hml @@ -14,5 +14,5 @@ -->
- +
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/progress/index.js b/UI/chart/entry/src/main/js/default/pages/progress/index.js index 601b567c3..92047bab9 100644 --- a/UI/chart/entry/src/main/js/default/pages/progress/index.js +++ b/UI/chart/entry/src/main/js/default/pages/progress/index.js @@ -14,9 +14,9 @@ */ export default { - data: { - segment: { - value: 100 - } + data: { + segment: { + value: 100 } + } } \ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/rainbow/index.css b/UI/chart/entry/src/main/js/default/pages/rainbow/index.css index 3855e1e2b..e793cdfee 100644 --- a/UI/chart/entry/src/main/js/default/pages/rainbow/index.css +++ b/UI/chart/entry/src/main/js/default/pages/rainbow/index.css @@ -13,7 +13,7 @@ * limitations under the License. */ - @import '../../common/common.css'; +@import '../../common/common.css'; .chart-data { width: 170px; diff --git a/UI/chart/entry/src/main/js/default/pages/rainbow/index.hml b/UI/chart/entry/src/main/js/default/pages/rainbow/index.hml index 4b5cb5bed..294772da2 100644 --- a/UI/chart/entry/src/main/js/default/pages/rainbow/index.hml +++ b/UI/chart/entry/src/main/js/default/pages/rainbow/index.hml @@ -14,27 +14,27 @@ -->
- -
-
-
- {{ $t('strings.accounted') }} 40% -
-
-
- {{ $t('strings.accounted') }} 20% -
-
-
- {{ $t('strings.accounted') }} 10% -
-
-
- {{ $t('strings.accounted') }} 15% -
-
-
- {{ $t('strings.accounted') }} 15% -
+ +
+
+
+ {{ $t('strings.accounted') }} 40%
+
+
+ {{ $t('strings.accounted') }} 20% +
+
+
+ {{ $t('strings.accounted') }} 10% +
+
+
+ {{ $t('strings.accounted') }} 15% +
+
+
+ {{ $t('strings.accounted') }} 15% +
+
\ No newline at end of file diff --git a/UI/chart/entry/src/main/js/default/pages/rainbow/index.js b/UI/chart/entry/src/main/js/default/pages/rainbow/index.js index 04614d8e0..c042d17b1 100644 --- a/UI/chart/entry/src/main/js/default/pages/rainbow/index.js +++ b/UI/chart/entry/src/main/js/default/pages/rainbow/index.js @@ -14,33 +14,33 @@ */ export default { - data: { - segment: [ - { - startColor: "#f7ce00", - endColor: "#f99b11", - value: 40 - }, - { - startColor: "#f76223", - endColor: "#f2400a", - value: 20 - }, - { - startColor: "#f772ac", - endColor: "#e65392", - value: 10 - }, - { - startColor: "#a575eb", - endColor: "#a12df7", - value: 15 - }, - { - startColor: "#7b79f7", - endColor: "#4b48f7", - value: 15 - } - ] - } + data: { + segment: [ + { + startColor: "#f7ce00", + endColor: "#f99b11", + value: 40 + }, + { + startColor: "#f76223", + endColor: "#f2400a", + value: 20 + }, + { + startColor: "#f772ac", + endColor: "#e65392", + value: 10 + }, + { + startColor: "#a575eb", + endColor: "#a12df7", + value: 15 + }, + { + startColor: "#7b79f7", + endColor: "#4b48f7", + value: 15 + } + ] + } } \ No newline at end of file diff --git a/UI/chart/package.json b/UI/chart/package.json index 5a670c660..aac0e27f1 100644 --- a/UI/chart/package.json +++ b/UI/chart/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/ability/FormAbility/.gitignore b/ability/FormAbility/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/ability/FormAbility/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/ability/FormAbility/README_zh.md b/ability/FormAbility/README_zh.md index a8d84af52..6296336d9 100644 --- a/ability/FormAbility/README_zh.md +++ b/ability/FormAbility/README_zh.md @@ -26,4 +26,4 @@ 1.本示例仅支持标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/ability/FormAbility/entry/src/main/ets/FormAbility/form.ts b/ability/FormAbility/entry/src/main/ets/FormAbility/form.ts index 30b83a370..5fb511fa1 100644 --- a/ability/FormAbility/entry/src/main/ets/FormAbility/form.ts +++ b/ability/FormAbility/entry/src/main/ets/FormAbility/form.ts @@ -25,156 +25,156 @@ const FORM_PARAM_NAME_KEY = "ohos.extra.param.key.form_name"; const FORM_PARAM_TEMPORARY_KEY = "ohos.extra.param.key.form_temporary"; function getTemperature(formId: string, count: number) { - const DECIMAL: number = 10; - const parsedFormId: number = parseInt(formId, DECIMAL); - const BASE_TEMP_MOD: number = 20; - const baseTemperature: number = parsedFormId % BASE_TEMP_MOD; - const RANGE_TEMP_MOD: number = 20; - return baseTemperature + Math.abs(count % RANGE_TEMP_MOD - RANGE_TEMP_MOD / 2); + const DECIMAL: number = 10; + const parsedFormId: number = parseInt(formId, DECIMAL); + const BASE_TEMP_MOD: number = 20; + const baseTemperature: number = parsedFormId % BASE_TEMP_MOD; + const RANGE_TEMP_MOD: number = 20; + return baseTemperature + Math.abs(count % RANGE_TEMP_MOD - RANGE_TEMP_MOD / 2); } function padZero(num: number) { - // trans num to string and pad 0 - if (num < 10) { - return `0${num}`; - } else { - return num.toString(); - } + // trans num to string and pad 0 + if (num < 10) { + return `0${num}`; + } else { + return num.toString(); + } } function getTime() { - const date = new Date(); - const hours = padZero(date.getHours()); - const minutes = padZero(date.getMinutes()); - const seconds = padZero(date.getSeconds()); - return `${hours}:${minutes}:${seconds}` + const date = new Date(); + const hours = padZero(date.getHours()); + const minutes = padZero(date.getMinutes()); + const seconds = padZero(date.getSeconds()); + return `${hours}:${minutes}:${seconds}` } async function storeFormInfo(formId: string, formName: string, tempFlag: boolean) { - let formInfo = { - "formName": formName, - "tempFlag": tempFlag, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // put form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.log(`storeFormInfo, put form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to storeFormInfo, err: ${JSON.stringify(err)}`); - } + let formInfo = { + "formName": formName, + "tempFlag": tempFlag, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // put form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.log(`storeFormInfo, put form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to storeFormInfo, err: ${JSON.stringify(err)}`); + } } async function updateTempFormInfo(formId: string) { - let formInfoDefault = { - "formName": "", - "tempFlag": false, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // get form info - const data = await storage.get(formId, JSON.stringify(formInfoDefault)); - Logger.log(`updateTempFormInfo, get form info successfully, formId: ${formId}`); - const formInfo = JSON.parse(data.toString()); - if (!formInfo.tempFlag) { - Logger.log(`updateTempFormInfo, formId: ${formId} is not temporary.`); - return; - } - - formInfo.tempFlag = false; - // update form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.log(`updateTempFormInfo, update form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to updateTempFormInfo, err: ${JSON.stringify(err)}`); + let formInfoDefault = { + "formName": "", + "tempFlag": false, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // get form info + const data = await storage.get(formId, JSON.stringify(formInfoDefault)); + Logger.log(`updateTempFormInfo, get form info successfully, formId: ${formId}`); + const formInfo = JSON.parse(data.toString()); + if (!formInfo.tempFlag) { + Logger.log(`updateTempFormInfo, formId: ${formId} is not temporary.`); + return; } + + formInfo.tempFlag = false; + // update form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.log(`updateTempFormInfo, update form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to updateTempFormInfo, err: ${JSON.stringify(err)}`); + } } async function updateForm(formId: string) { - let formInfoDefault = { - "formName": "", - "tempFlag": false, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // get form info - const data = await storage.get(formId, JSON.stringify(formInfoDefault)); - Logger.log(`updateForm, get form info successfully, formId: ${formId}`); - const formInfo = JSON.parse(data.toString()); - formInfo.updateCount = formInfo.updateCount + 1; + let formInfoDefault = { + "formName": "", + "tempFlag": false, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // get form info + const data = await storage.get(formId, JSON.stringify(formInfoDefault)); + Logger.log(`updateForm, get form info successfully, formId: ${formId}`); + const formInfo = JSON.parse(data.toString()); + formInfo.updateCount = formInfo.updateCount + 1; - let obj = { - "temperature": getTemperature(formId, formInfo.updateCount).toString(), - "time": getTime() - }; - let formData = formBindingData.createFormBindingData(obj); - formProvider.updateForm(formId, formData).catch((err) => { - Logger.error(`updateForm, err: ${JSON.stringify(err)}`); - }); + let obj = { + "temperature": getTemperature(formId, formInfo.updateCount).toString(), + "time": getTime() + }; + let formData = formBindingData.createFormBindingData(obj); + formProvider.updateForm(formId, formData).catch((err) => { + Logger.error(`updateForm, err: ${JSON.stringify(err)}`); + }); - // update form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.log(`updateForm, update form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to updateForm, err: ${JSON.stringify(err)}`); - } + // update form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.log(`updateForm, update form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to updateForm, err: ${JSON.stringify(err)}`); + } } async function deleteFormInfo(formId: string) { - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // del form info - await storage.delete(formId); - Logger.log(`deleteFormInfo, del form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to deleteFormInfo, err: ${JSON.stringify(err)}`); - } + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // del form info + await storage.delete(formId); + Logger.log(`deleteFormInfo, del form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to deleteFormInfo, err: ${JSON.stringify(err)}`); + } } export default { - onCreate(want) { - Logger.log(`FormAbility onCreate, want: ${JSON.stringify(want)}`); + onCreate(want) { + Logger.log(`FormAbility onCreate, want: ${JSON.stringify(want)}`); - // get form info - let formId = want.parameters[FORM_PARAM_IDENTITY_KEY]; - let formName = want.parameters[FORM_PARAM_NAME_KEY]; - let tempFlag = want.parameters[FORM_PARAM_TEMPORARY_KEY]; - storeFormInfo(formId, formName, tempFlag); + // get form info + let formId = want.parameters[FORM_PARAM_IDENTITY_KEY]; + let formName = want.parameters[FORM_PARAM_NAME_KEY]; + let tempFlag = want.parameters[FORM_PARAM_TEMPORARY_KEY]; + storeFormInfo(formId, formName, tempFlag); - let obj = { - "temperature": getTemperature(formId, 0).toString(), - "time": getTime() - }; - let formData = formBindingData.createFormBindingData(obj); - return formData; - }, - onCastToNormal(formId) { - Logger.log(`FormAbility onCastToNormal, formId: ${formId}`); - updateTempFormInfo(formId); - }, - onUpdate(formId) { - Logger.log(`FormAbility onUpdate, formId: ${formId}`); - updateForm(formId); - }, - onVisibilityChange(newStatus) { - Logger.log(`FormAbility onVisibilityChange`); - }, - onEvent(formId, message) { - Logger.log(`FormAbility onEvent, formId = ${formId}, message: ${JSON.stringify(message)}`); - }, - onDestroy(formId) { - Logger.log(`FormAbility onDestroy, formId = ${formId}`); - deleteFormInfo(formId); - }, - onAcquireFormState(want) { - Logger.log(`FormAbility onAcquireFormState`); - return formInfo.FormState.READY; - }, + let obj = { + "temperature": getTemperature(formId, 0).toString(), + "time": getTime() + }; + let formData = formBindingData.createFormBindingData(obj); + return formData; + }, + onCastToNormal(formId) { + Logger.log(`FormAbility onCastToNormal, formId: ${formId}`); + updateTempFormInfo(formId); + }, + onUpdate(formId) { + Logger.log(`FormAbility onUpdate, formId: ${formId}`); + updateForm(formId); + }, + onVisibilityChange(newStatus) { + Logger.log(`FormAbility onVisibilityChange`); + }, + onEvent(formId, message) { + Logger.log(`FormAbility onEvent, formId = ${formId}, message: ${JSON.stringify(message)}`); + }, + onDestroy(formId) { + Logger.log(`FormAbility onDestroy, formId = ${formId}`); + deleteFormInfo(formId); + }, + onAcquireFormState(want) { + Logger.log(`FormAbility onAcquireFormState`); + return formInfo.FormState.READY; + }, } diff --git a/ability/FormAbility/entry/src/main/ets/model/Logger.ts b/ability/FormAbility/entry/src/main/ets/model/Logger.ts index 28f4cb864..1708e3bf8 100644 --- a/ability/FormAbility/entry/src/main/ets/model/Logger.ts +++ b/ability/FormAbility/entry/src/main/ets/model/Logger.ts @@ -14,22 +14,28 @@ */ class Logger { - constructor(private prefix: string) {} - public log(...args: any[]) { - console.log(`[${this.prefix}]: ${args.join('')}`) - } - public info(...args: any[]) { - console.info(`[${this.prefix}]: ${args.join('')}`) - } - public debug(...args: any[]) { - console.debug(`[${this.prefix}]: ${args.join('')}`) - } - public warn(...args: any[]) { - console.warn(`[${this.prefix}]: ${args.join('')}`) - } - public error(...args: any[]) { - console.error(`[${this.prefix}]: ${args.join('')}`) - } + constructor(private prefix: string) { + } + + public log(...args: any[]) { + console.log(`[${this.prefix}]: ${args.join('')}`) + } + + public info(...args: any[]) { + console.info(`[${this.prefix}]: ${args.join('')}`) + } + + public debug(...args: any[]) { + console.debug(`[${this.prefix}]: ${args.join('')}`) + } + + public warn(...args: any[]) { + console.warn(`[${this.prefix}]: ${args.join('')}`) + } + + public error(...args: any[]) { + console.error(`[${this.prefix}]: ${args.join('')}`) + } } export default new Logger('eTSFormAbility') diff --git a/ability/FormAbility/entry/src/main/js/widget/pages/index/index.hml b/ability/FormAbility/entry/src/main/js/widget/pages/index/index.hml index 05b5b96a9..23930fa54 100644 --- a/ability/FormAbility/entry/src/main/js/widget/pages/index/index.hml +++ b/ability/FormAbility/entry/src/main/js/widget/pages/index/index.hml @@ -1,11 +1,11 @@
- -
- -
-
- {{ $t('strings.temperature') }}{{temperature}} ℃ - {{ $t('strings.time') }} {{time}} -
-
+ +
+ +
+
+ {{ $t('strings.temperature') }}{{ temperature }} ℃ + {{ $t('strings.time') }} {{ time }} +
+
\ No newline at end of file diff --git a/ability/FormAbility/package.json b/ability/FormAbility/package.json index 4671fd268..bdbbe79e6 100644 --- a/ability/FormAbility/package.json +++ b/ability/FormAbility/package.json @@ -8,8 +8,8 @@ }, "version": "1.0.0", "dependencies": { - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3", - "@ohos/hypium": "1.0.0" + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6", + "@ohos/hypium": "1.0.1" } } diff --git a/ability/FormExtAbility/.gitignore b/ability/FormExtAbility/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/ability/FormExtAbility/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/ability/FormExtAbility/README_zh.md b/ability/FormExtAbility/README_zh.md index 8b4fe7144..381e0565c 100644 --- a/ability/FormExtAbility/README_zh.md +++ b/ability/FormExtAbility/README_zh.md @@ -27,4 +27,4 @@ Ability:Ability是应用所具备能力的抽象,也是应用程序的重要 2.本示例为Stage模型,从API version 9开始支持。 -3.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/ability/FormExtAbility/entry/src/main/ets/Application/AbilityStage.ts b/ability/FormExtAbility/entry/src/main/ets/Application/AbilityStage.ts index 9c26d446b..7ce4d8d98 100644 --- a/ability/FormExtAbility/entry/src/main/ets/Application/AbilityStage.ts +++ b/ability/FormExtAbility/entry/src/main/ets/Application/AbilityStage.ts @@ -17,7 +17,7 @@ import AbilityStage from "@ohos.application.AbilityStage" import Logger from '../model/Logger'; export default class MyAbilityStage extends AbilityStage { - onCreate() { - Logger.log("[Demo] MyAbilityStage onCreate") - } + onCreate() { + Logger.log("[Demo] MyAbilityStage onCreate") + } } \ No newline at end of file diff --git a/ability/FormExtAbility/entry/src/main/ets/FormAbility/FormAbility.ts b/ability/FormExtAbility/entry/src/main/ets/FormAbility/FormAbility.ts index 5711dd129..6432ecec3 100644 --- a/ability/FormExtAbility/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/ability/FormExtAbility/entry/src/main/ets/FormAbility/FormAbility.ts @@ -26,162 +26,162 @@ const FORM_PARAM_NAME_KEY = "ohos.extra.param.key.form_name"; const FORM_PARAM_TEMPORARY_KEY = "ohos.extra.param.key.form_temporary"; function getTemperature(formId: string, count: number) { - const DECIMAL: number = 10; - const parsedFormId: number = parseInt(formId, DECIMAL); - const BASE_TEMP_MOD: number = 20; - const baseTemperature: number = parsedFormId % BASE_TEMP_MOD; - const RANGE_TEMP_MOD: number = 20; - return baseTemperature + Math.abs(count % RANGE_TEMP_MOD - RANGE_TEMP_MOD / 2); + const DECIMAL: number = 10; + const parsedFormId: number = parseInt(formId, DECIMAL); + const BASE_TEMP_MOD: number = 20; + const baseTemperature: number = parsedFormId % BASE_TEMP_MOD; + const RANGE_TEMP_MOD: number = 20; + return baseTemperature + Math.abs(count % RANGE_TEMP_MOD - RANGE_TEMP_MOD / 2); } function padZero(num: number) { - // trans num to string and pad 0 - if (num < 10) { - return `0${num}`; - } else { - return num.toString(); - } + // trans num to string and pad 0 + if (num < 10) { + return `0${num}`; + } else { + return num.toString(); + } } function getTime() { - const date = new Date(); - const hours = padZero(date.getHours()); - const minutes = padZero(date.getMinutes()); - const seconds = padZero(date.getSeconds()); - return `${hours}:${minutes}:${seconds}` + const date = new Date(); + const hours = padZero(date.getHours()); + const minutes = padZero(date.getMinutes()); + const seconds = padZero(date.getSeconds()); + return `${hours}:${minutes}:${seconds}` } async function storeFormInfo(formId: string, formName: string, tempFlag: boolean) { - let formInfo = { - "formName": formName, - "tempFlag": tempFlag, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // put form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.log(`storeFormInfo, put form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to storeFormInfo, err: ${JSON.stringify(err)}`); - } + let formInfo = { + "formName": formName, + "tempFlag": tempFlag, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // put form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.log(`storeFormInfo, put form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to storeFormInfo, err: ${JSON.stringify(err)}`); + } } async function updateTempFormInfo(formId: string) { - let formInfoDefault = { - "formName": "", - "tempFlag": false, - "updateCount": 0 - }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // get form info - const data = await storage.get(formId, JSON.stringify(formInfoDefault)); - Logger.log(`updateTempFormInfo, get form info successfully, formId: ${formId}`); - const formInfo = JSON.parse(data.toString()); - if (!formInfo.tempFlag) { - Logger.log(`updateTempFormInfo, formId: ${formId} is not temporary.`); - return; - } - - formInfo.tempFlag = false; - // update form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.log(`updateTempFormInfo, update form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to updateTempFormInfo, err: ${JSON.stringify(err)}`); + let formInfoDefault = { + "formName": "", + "tempFlag": false, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // get form info + const data = await storage.get(formId, JSON.stringify(formInfoDefault)); + Logger.log(`updateTempFormInfo, get form info successfully, formId: ${formId}`); + const formInfo = JSON.parse(data.toString()); + if (!formInfo.tempFlag) { + Logger.log(`updateTempFormInfo, formId: ${formId} is not temporary.`); + return; } + + formInfo.tempFlag = false; + // update form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.log(`updateTempFormInfo, update form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to updateTempFormInfo, err: ${JSON.stringify(err)}`); + } } async function updateForm(formId: string) { - let formInfoDefault = { - "formName": "", - "tempFlag": false, - "updateCount": 0 + let formInfoDefault = { + "formName": "", + "tempFlag": false, + "updateCount": 0 + }; + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // get form info + const data = await storage.get(formId, JSON.stringify(formInfoDefault)); + Logger.log(`updateForm, get form info successfully, formId: ${formId}`); + const formInfo = JSON.parse(data.toString()); + formInfo.updateCount = formInfo.updateCount + 1; + + let obj = { + "temperature": getTemperature(formId, formInfo.updateCount).toString(), + "time": getTime() }; - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // get form info - const data = await storage.get(formId, JSON.stringify(formInfoDefault)); - Logger.log(`updateForm, get form info successfully, formId: ${formId}`); - const formInfo = JSON.parse(data.toString()); - formInfo.updateCount = formInfo.updateCount + 1; - - let obj = { - "temperature": getTemperature(formId, formInfo.updateCount).toString(), - "time": getTime() - }; - let formData = formBindingData.createFormBindingData(obj); - formProvider.updateForm(formId, formData).catch((err) => { - Logger.error(`updateForm, err: ${JSON.stringify(err)}`); - }); - - // update form info - await storage.put(formId, JSON.stringify(formInfo)); - Logger.log(`updateForm, update form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to updateForm, err: ${JSON.stringify(err)}`); - } + let formData = formBindingData.createFormBindingData(obj); + formProvider.updateForm(formId, formData).catch((err) => { + Logger.error(`updateForm, err: ${JSON.stringify(err)}`); + }); + + // update form info + await storage.put(formId, JSON.stringify(formInfo)); + Logger.log(`updateForm, update form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to updateForm, err: ${JSON.stringify(err)}`); + } } async function deleteFormInfo(formId: string) { - try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); - // del form info - await storage.delete(formId); - Logger.log(`deleteFormInfo, del form info successfully, formId: ${formId}`); - await storage.flush(); - } catch (err) { - Logger.error(`failed to deleteFormInfo, err: ${JSON.stringify(err)}`); - } + try { + const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + // del form info + await storage.delete(formId); + Logger.log(`deleteFormInfo, del form info successfully, formId: ${formId}`); + await storage.flush(); + } catch (err) { + Logger.error(`failed to deleteFormInfo, err: ${JSON.stringify(err)}`); + } } export default class FormAbility extends FormExtension { - onCreate(want) { - Logger.log(`FormAbility onCreate, want: ${JSON.stringify(want)}`); - - // get form info - let formId = want.parameters[FORM_PARAM_IDENTITY_KEY]; - let formName = want.parameters[FORM_PARAM_NAME_KEY]; - let tempFlag = want.parameters[FORM_PARAM_TEMPORARY_KEY]; - storeFormInfo(formId, formName, tempFlag); - - let obj = { - "temperature": getTemperature(formId, 0).toString(), - "time": getTime() - }; - let formData = formBindingData.createFormBindingData(obj); - return formData; - } - - onCastToNormal(formId) { - Logger.log(`FormAbility onCastToNormal, formId: ${formId}`); - updateTempFormInfo(formId); - } - - onUpdate(formId) { - Logger.log(`FormAbility onUpdate, formId: ${formId}`); - updateForm(formId); - } - - onVisibilityChange(newStatus) { - Logger.log(`FormAbility onVisibilityChange`); - } - - onEvent(formId, message) { - Logger.log(`FormAbility onEvent, formId = ${formId}, message: ${JSON.stringify(message)}`); - } - - onDestroy(formId) { - Logger.log(`FormAbility onDestroy, formId = ${formId}`); - deleteFormInfo(formId); - } - - onAcquireFormState(want) { - Logger.log(`FormAbility onAcquireFormState`); - return formInfo.FormState.READY; - } + onCreate(want) { + Logger.log(`FormAbility onCreate, want: ${JSON.stringify(want)}`); + + // get form info + let formId = want.parameters[FORM_PARAM_IDENTITY_KEY]; + let formName = want.parameters[FORM_PARAM_NAME_KEY]; + let tempFlag = want.parameters[FORM_PARAM_TEMPORARY_KEY]; + storeFormInfo(formId, formName, tempFlag); + + let obj = { + "temperature": getTemperature(formId, 0).toString(), + "time": getTime() + }; + let formData = formBindingData.createFormBindingData(obj); + return formData; + } + + onCastToNormal(formId) { + Logger.log(`FormAbility onCastToNormal, formId: ${formId}`); + updateTempFormInfo(formId); + } + + onUpdate(formId) { + Logger.log(`FormAbility onUpdate, formId: ${formId}`); + updateForm(formId); + } + + onVisibilityChange(newStatus) { + Logger.log(`FormAbility onVisibilityChange`); + } + + onEvent(formId, message) { + Logger.log(`FormAbility onEvent, formId = ${formId}, message: ${JSON.stringify(message)}`); + } + + onDestroy(formId) { + Logger.log(`FormAbility onDestroy, formId = ${formId}`); + deleteFormInfo(formId); + } + + onAcquireFormState(want) { + Logger.log(`FormAbility onAcquireFormState`); + return formInfo.FormState.READY; + } }; \ No newline at end of file diff --git a/ability/FormExtAbility/entry/src/main/ets/MainAbility/MainAbility.ts b/ability/FormExtAbility/entry/src/main/ets/MainAbility/MainAbility.ts index 22a007f3a..88b9239b2 100644 --- a/ability/FormExtAbility/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/ability/FormExtAbility/entry/src/main/ets/MainAbility/MainAbility.ts @@ -17,34 +17,34 @@ import Ability from '@ohos.application.Ability' import Logger from '../model/Logger'; export default class MainAbility extends Ability { - onCreate(want, launchParam) { - Logger.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - } - - onDestroy() { - Logger.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - Logger.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - Logger.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - Logger.log("[Demo] MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - Logger.log("[Demo] MainAbility onBackground") - } + onCreate(want, launchParam) { + Logger.log("[Demo] MainAbility onCreate") + globalThis.abilityWant = want; + } + + onDestroy() { + Logger.log("[Demo] MainAbility onDestroy") + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + Logger.log("[Demo] MainAbility onWindowStageCreate") + + windowStage.setUIContent(this.context, "pages/index", null) + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + Logger.log("[Demo] MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + Logger.log("[Demo] MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + Logger.log("[Demo] MainAbility onBackground") + } }; diff --git a/ability/FormExtAbility/entry/src/main/ets/model/Logger.ts b/ability/FormExtAbility/entry/src/main/ets/model/Logger.ts index 11447d0b7..25d2b130f 100644 --- a/ability/FormExtAbility/entry/src/main/ets/model/Logger.ts +++ b/ability/FormExtAbility/entry/src/main/ets/model/Logger.ts @@ -14,22 +14,28 @@ */ class Logger { - constructor(private prefix: string) {} - public log(...args: any[]) { - console.log(`[${this.prefix}]: ${args.join('')}`) - } - public info(...args: any[]) { - console.info(`[${this.prefix}]: ${args.join('')}`) - } - public debug(...args: any[]) { - console.debug(`[${this.prefix}]: ${args.join('')}`) - } - public warn(...args: any[]) { - console.warn(`[${this.prefix}]: ${args.join('')}`) - } - public error(...args: any[]) { - console.error(`[${this.prefix}]: ${args.join('')}`) - } + constructor(private prefix: string) { + } + + public log(...args: any[]) { + console.log(`[${this.prefix}]: ${args.join('')}`) + } + + public info(...args: any[]) { + console.info(`[${this.prefix}]: ${args.join('')}`) + } + + public debug(...args: any[]) { + console.debug(`[${this.prefix}]: ${args.join('')}`) + } + + public warn(...args: any[]) { + console.warn(`[${this.prefix}]: ${args.join('')}`) + } + + public error(...args: any[]) { + console.error(`[${this.prefix}]: ${args.join('')}`) + } } export default new Logger('eTSFormExtAbility') diff --git a/ability/FormExtAbility/entry/src/main/js/widget/pages/index/index.hml b/ability/FormExtAbility/entry/src/main/js/widget/pages/index/index.hml index 05b5b96a9..23930fa54 100644 --- a/ability/FormExtAbility/entry/src/main/js/widget/pages/index/index.hml +++ b/ability/FormExtAbility/entry/src/main/js/widget/pages/index/index.hml @@ -1,11 +1,11 @@
- -
- -
-
- {{ $t('strings.temperature') }}{{temperature}} ℃ - {{ $t('strings.time') }} {{time}} -
-
+ +
+ +
+
+ {{ $t('strings.temperature') }}{{ temperature }} ℃ + {{ $t('strings.time') }} {{ time }} +
+
\ No newline at end of file diff --git a/ability/FormExtAbility/package.json b/ability/FormExtAbility/package.json index 8dba951ce..3b6b3ead3 100644 --- a/ability/FormExtAbility/package.json +++ b/ability/FormExtAbility/package.json @@ -8,8 +8,8 @@ }, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/ability/FormLauncher/.gitignore b/ability/FormLauncher/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/ability/FormLauncher/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/ability/FormLauncher/README_zh.md b/ability/FormLauncher/README_zh.md index 76fa7014b..5982e4a4b 100644 --- a/ability/FormLauncher/README_zh.md +++ b/ability/FormLauncher/README_zh.md @@ -33,7 +33,7 @@ 1.本示例仅支持标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 3.本示例需要使用@ohos.application.formHost系统权限的系统接口。使用Full SDK时需要手动从镜像站点获取,并在DevEco Studio中替换,具体操作可参考[替换指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md)。 diff --git a/ability/FormLauncher/entry/package.json b/ability/FormLauncher/entry/package.json index f04a697de..4857e2867 100644 --- a/ability/FormLauncher/entry/package.json +++ b/ability/FormLauncher/entry/package.json @@ -1,11 +1,11 @@ { - "devDependencies":{}, - "name":"entry", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" + "devDependencies": {}, + "name": "entry", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" }, - "version":"1.0.0", - "dependencies":{} + "version": "1.0.0", + "dependencies": {} } \ No newline at end of file diff --git a/ability/FormLauncher/entry/src/main/ets/model/Logger.ts b/ability/FormLauncher/entry/src/main/ets/model/Logger.ts index f50d883d9..e2aeb095d 100644 --- a/ability/FormLauncher/entry/src/main/ets/model/Logger.ts +++ b/ability/FormLauncher/entry/src/main/ets/model/Logger.ts @@ -14,22 +14,28 @@ */ class Logger { - constructor(private prefix: string) {} - public log(...args: any[]) { - console.log(`[${this.prefix}]: ${args.join('')}`) - } - public info(...args: any[]) { - console.info(`[${this.prefix}]: ${args.join('')}`) - } - public debug(...args: any[]) { - console.debug(`[${this.prefix}]: ${args.join('')}`) - } - public warn(...args: any[]) { - console.warn(`[${this.prefix}]: ${args.join('')}`) - } - public error(...args: any[]) { - console.error(`[${this.prefix}]: ${args.join('')}`) - } + constructor(private prefix: string) { + } + + public log(...args: any[]) { + console.log(`[${this.prefix}]: ${args.join('')}`) + } + + public info(...args: any[]) { + console.info(`[${this.prefix}]: ${args.join('')}`) + } + + public debug(...args: any[]) { + console.debug(`[${this.prefix}]: ${args.join('')}`) + } + + public warn(...args: any[]) { + console.warn(`[${this.prefix}]: ${args.join('')}`) + } + + public error(...args: any[]) { + console.error(`[${this.prefix}]: ${args.join('')}`) + } } export default new Logger('eTSFormLauncher') diff --git a/ability/FormLauncher/package.json b/ability/FormLauncher/package.json index 0b1dcaa99..200f19709 100644 --- a/ability/FormLauncher/package.json +++ b/ability/FormLauncher/package.json @@ -1,15 +1,15 @@ { - "devDependencies":{}, - "name":"mylauncher", - "ohos":{ - "org":"huawei", - "directoryLevel":"project", - "buildTool":"hvigor" + "devDependencies": {}, + "name": "mylauncher", + "ohos": { + "org": "huawei", + "directoryLevel": "project", + "buildTool": "hvigor" }, - "version":"1.0.0", - "dependencies":{ - "@ohos/hypium":"1.0.1", - "@ohos/hvigor-ohos-plugin":"1.1.6", - "@ohos/hvigor":"1.1.6" + "version": "1.0.0", + "dependencies": { + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/ability/JsDistributedMusicPlayer/.gitignore b/ability/JsDistributedMusicPlayer/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/ability/JsDistributedMusicPlayer/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/ability/JsDistributedMusicPlayer/README_zh.md b/ability/JsDistributedMusicPlayer/README_zh.md index 993b0eaa1..85edb9555 100644 --- a/ability/JsDistributedMusicPlayer/README_zh.md +++ b/ability/JsDistributedMusicPlayer/README_zh.md @@ -26,7 +26,7 @@ 1.本示例仅支持标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 3.如果安装本示例报错为error:install sign info inconsistent,则有可能本应用被设置为系统预置应用,已安装在系统中,此时需使用命令进行替换安装,并在替换安装后对设备进行重启操作,具体命令如下: diff --git a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/app.js b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/app.js index e3a0891c0..e2e723dcb 100644 --- a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/app.js +++ b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/KvStoreModel.js b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/KvStoreModel.js index 441b020d7..3b31b7b8e 100644 --- a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/KvStoreModel.js +++ b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/KvStoreModel.js @@ -18,97 +18,97 @@ import distributedData from '@ohos.data.distributedData'; const STORE_ID = 'musicplayer_kvstore'; export default class KvStoreModel { - kvManager; - kvStore; + kvManager; + kvStore; - constructor() { - } + constructor() { + } - createKvStore(callback) { - if (typeof (this.kvStore) === 'undefined') { - var config = { - bundleName: 'ohos.samples.distributedmusicplayer', - userInfo: { - userId: '0', - userType: 0 - } - }; - let self = this; - console.info('MusicPlayer[KvStoreModel] createKVManager begin'); - distributedData.createKVManager(config).then((manager) => { - console.info('MusicPlayer[KvStoreModel] createKVManager success, kvManager=' + JSON.stringify(manager)); - self.kvManager = manager; - var options = { - createIfMissing: true, - encrypt: false, - backup: false, - autoSync: true, - kvStoreType: 1, - schema: '', - securityLevel: 3, - }; - console.info('MusicPlayer[KvStoreModel] kvManager.getKVStore begin'); - self.kvManager.getKVStore(STORE_ID, options).then((store) => { - console.info('MusicPlayer[KvStoreModel] getKVStore success, kvStore=' + store); - self.kvStore = store; - callback(); - }); - console.info('MusicPlayer[KvStoreModel] kvManager.getKVStore end'); - }); - console.info('MusicPlayer[KvStoreModel] createKVManager end'); - } else { - callback(); + createKvStore(callback) { + if (typeof (this.kvStore) === 'undefined') { + var config = { + bundleName: 'ohos.samples.distributedmusicplayer', + userInfo: { + userId: '0', + userType: 0 } - } - - broadcastMessage(msg) { - console.info('MusicPlayer[KvStoreModel] broadcastMessage ' + msg); - var num = Math.random(); - let self = this; - this.createKvStore(() => { - self.put(msg, num); + }; + let self = this; + console.info('MusicPlayer[KvStoreModel] createKVManager begin'); + distributedData.createKVManager(config).then((manager) => { + console.info('MusicPlayer[KvStoreModel] createKVManager success, kvManager=' + JSON.stringify(manager)); + self.kvManager = manager; + var options = { + createIfMissing: true, + encrypt: false, + backup: false, + autoSync: true, + kvStoreType: 1, + schema: '', + securityLevel: 3, + }; + console.info('MusicPlayer[KvStoreModel] kvManager.getKVStore begin'); + self.kvManager.getKVStore(STORE_ID, options).then((store) => { + console.info('MusicPlayer[KvStoreModel] getKVStore success, kvStore=' + store); + self.kvStore = store; + callback(); }); + console.info('MusicPlayer[KvStoreModel] kvManager.getKVStore end'); + }); + console.info('MusicPlayer[KvStoreModel] createKVManager end'); + } else { + callback(); } + } - put(key, value) { - console.info('MusicPlayer[KvStoreModel] kvStore.put ' + key + '=' + value); - this.kvStore.put(key, value).then((data) => { - this.kvStore.get(key).then((data) => { - console.info('MusicPlayer[KvStoreModel] kvStore.get ' + key + '=' + JSON.stringify(data)); - }); - console.info('MusicPlayer[KvStoreModel] kvStore.put ' + key + ' finished, data=' + JSON.stringify(data)); - }).catch((err) => { - console.error('MusicPlayer[KvStoreModel] kvStore.put ' + key + ' failed, ' + JSON.stringify(err)); - }); - } + broadcastMessage(msg) { + console.info('MusicPlayer[KvStoreModel] broadcastMessage ' + msg); + var num = Math.random(); + let self = this; + this.createKvStore(() => { + self.put(msg, num); + }); + } - setOnMessageReceivedListener(msg, callback) { - console.info('MusicPlayer[KvStoreModel] setOnMessageReceivedListener ' + msg); - let self = this; - this.createKvStore(() => { - console.info('MusicPlayer[KvStoreModel] kvStore.on(dataChange) begin'); - self.kvStore.on('dataChange', 1, (data) => { - console.info('MusicPlayer[KvStoreModel] dataChange, ' + JSON.stringify(data)); - console.info('MusicPlayer[KvStoreModel] dataChange, insert ' + data.insertEntries.length + ' udpate ' - + data.updateEntries.length); - for (var i = 0; i < data.insertEntries.length; i++) { - if (data.insertEntries[i].key === msg) { - console.info('MusicPlayer[KvStoreModel] insertEntries receive ' + msg + '=' - + JSON.stringify(data.insertEntries[i].value)); - callback(); - return; - } - } - for (i = 0; i < data.updateEntries.length; i++) { - if (data.updateEntries[i].key === msg) { - console.info('MusicPlayer[KvStoreModel] updateEntries receive ' + msg + '=' - + JSON.stringify(data.updateEntries[i].value)); - callback(); - return; - } - } - }); - console.info('MusicPlayer[KvStoreModel] kvStore.on(dataChange) end'); - }); - } + put(key, value) { + console.info('MusicPlayer[KvStoreModel] kvStore.put ' + key + '=' + value); + this.kvStore.put(key, value).then((data) => { + this.kvStore.get(key).then((data) => { + console.info('MusicPlayer[KvStoreModel] kvStore.get ' + key + '=' + JSON.stringify(data)); + }); + console.info('MusicPlayer[KvStoreModel] kvStore.put ' + key + ' finished, data=' + JSON.stringify(data)); + }).catch((err) => { + console.error('MusicPlayer[KvStoreModel] kvStore.put ' + key + ' failed, ' + JSON.stringify(err)); + }); + } + + setOnMessageReceivedListener(msg, callback) { + console.info('MusicPlayer[KvStoreModel] setOnMessageReceivedListener ' + msg); + let self = this; + this.createKvStore(() => { + console.info('MusicPlayer[KvStoreModel] kvStore.on(dataChange) begin'); + self.kvStore.on('dataChange', 1, (data) => { + console.info('MusicPlayer[KvStoreModel] dataChange, ' + JSON.stringify(data)); + console.info('MusicPlayer[KvStoreModel] dataChange, insert ' + data.insertEntries.length + ' udpate ' + + data.updateEntries.length); + for (var i = 0; i < data.insertEntries.length; i++) { + if (data.insertEntries[i].key === msg) { + console.info('MusicPlayer[KvStoreModel] insertEntries receive ' + msg + '=' + + JSON.stringify(data.insertEntries[i].value)); + callback(); + return; + } + } + for (i = 0; i < data.updateEntries.length; i++) { + if (data.updateEntries[i].key === msg) { + console.info('MusicPlayer[KvStoreModel] updateEntries receive ' + msg + '=' + + JSON.stringify(data.updateEntries[i].value)); + callback(); + return; + } + } + }); + console.info('MusicPlayer[KvStoreModel] kvStore.on(dataChange) end'); + }); + } } \ No newline at end of file diff --git a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/RemoteDeviceModel.js b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/RemoteDeviceModel.js index fd11945c4..5cf965212 100644 --- a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/RemoteDeviceModel.js +++ b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/model/RemoteDeviceModel.js @@ -18,167 +18,167 @@ import deviceManager from '@ohos.distributedHardware.deviceManager'; var SUBSCRIBE_ID = 100; export default class RemoteDeviceModel { - deviceList = []; - discoverList = []; - callback; - authCallback = null; - #deviceManager; + deviceList = []; + discoverList = []; + callback; + authCallback = null; + #deviceManager; - constructor() { - } + constructor() { + } - registerDeviceListCallback(callback) { - if (typeof (this.#deviceManager) === 'undefined') { - console.log('MusicPlayer[RemoteDeviceModel] deviceManager.createDeviceManager begin'); - deviceManager.createDeviceManager('com.ohos.distributedmusicplayer', (error, value) => { - if (error) { - console.error('createDeviceManager failed.'); - return; - } - this.#deviceManager = value; - this.registerDeviceListCallback_(callback); - console.log('MusicPlayer[RemoteDeviceModel] createDeviceManager callback returned, error=' + error + ' value=' + value); - }); - console.log('MusicPlayer[RemoteDeviceModel] deviceManager.createDeviceManager end'); - } else { - this.registerDeviceListCallback_(callback); + registerDeviceListCallback(callback) { + if (typeof (this.#deviceManager) === 'undefined') { + console.log('MusicPlayer[RemoteDeviceModel] deviceManager.createDeviceManager begin'); + deviceManager.createDeviceManager('com.ohos.distributedmusicplayer', (error, value) => { + if (error) { + console.error('createDeviceManager failed.'); + return; } + this.#deviceManager = value; + this.registerDeviceListCallback_(callback); + console.log('MusicPlayer[RemoteDeviceModel] createDeviceManager callback returned, error=' + error + ' value=' + value); + }); + console.log('MusicPlayer[RemoteDeviceModel] deviceManager.createDeviceManager end'); + } else { + this.registerDeviceListCallback_(callback); } + } - registerDeviceListCallback_(callback) { - console.info('MusicPlayer[RemoteDeviceModel] registerDeviceListCallback'); - this.callback = callback; - if (this.#deviceManager == undefined) { - console.error('MusicPlayer[RemoteDeviceModel] deviceManager has not initialized'); - this.callback(); - return; - } + registerDeviceListCallback_(callback) { + console.info('MusicPlayer[RemoteDeviceModel] registerDeviceListCallback'); + this.callback = callback; + if (this.#deviceManager == undefined) { + console.error('MusicPlayer[RemoteDeviceModel] deviceManager has not initialized'); + this.callback(); + return; + } - console.info('MusicPlayer[RemoteDeviceModel] getTrustedDeviceListSync begin'); - var list = this.#deviceManager.getTrustedDeviceListSync(); - console.info('MusicPlayer[RemoteDeviceModel] getTrustedDeviceListSync end, deviceList=' + JSON.stringify(list)); - if (typeof (list) != 'undefined' && typeof (list.length) != 'undefined') { - this.deviceList = list; - } - this.callback(); - console.info('MusicPlayer[RemoteDeviceModel] callback finished'); - - this.#deviceManager.on('deviceStateChange', (data) => { - console.info('MusicPlayer[RemoteDeviceModel] deviceStateChange data=' + JSON.stringify(data)); - switch (data.action) { - case 0: - this.deviceList[this.deviceList.length] = data.device; - console.info('MusicPlayer[RemoteDeviceModel] online, updated device list=' + JSON.stringify(this.deviceList)); - this.callback(); - if (this.authCallback != null) { - this.authCallback(); - this.authCallback = null; - } - break; - case 2: - if (this.deviceList.length > 0) { - for (var i = 0; i < this.deviceList.length; i++) { - if (this.deviceList[i].deviceId === data.device.deviceId) { - this.deviceList[i] = data.device; - break; - } - } - } - console.info('MusicPlayer[RemoteDeviceModel] change, updated device list=' + JSON.stringify(this.deviceList)); - this.callback(); - break; - case 1: - if (this.deviceList.length > 0) { - var list = []; - for (var i = 0; i < this.deviceList.length; i++) { - if (this.deviceList[i].deviceId != data.device.deviceId) { - list[i] = data.device; - } - } - this.deviceList = list; - } - console.info('MusicPlayer[RemoteDeviceModel] offline, updated device list=' + JSON.stringify(data.device)); - this.callback(); + console.info('MusicPlayer[RemoteDeviceModel] getTrustedDeviceListSync begin'); + var list = this.#deviceManager.getTrustedDeviceListSync(); + console.info('MusicPlayer[RemoteDeviceModel] getTrustedDeviceListSync end, deviceList=' + JSON.stringify(list)); + if (typeof (list) != 'undefined' && typeof (list.length) != 'undefined') { + this.deviceList = list; + } + this.callback(); + console.info('MusicPlayer[RemoteDeviceModel] callback finished'); + + this.#deviceManager.on('deviceStateChange', (data) => { + console.info('MusicPlayer[RemoteDeviceModel] deviceStateChange data=' + JSON.stringify(data)); + switch (data.action) { + case 0: + this.deviceList[this.deviceList.length] = data.device; + console.info('MusicPlayer[RemoteDeviceModel] online, updated device list=' + JSON.stringify(this.deviceList)); + this.callback(); + if (this.authCallback != null) { + this.authCallback(); + this.authCallback = null; + } + break; + case 2: + if (this.deviceList.length > 0) { + for (var i = 0; i < this.deviceList.length; i++) { + if (this.deviceList[i].deviceId === data.device.deviceId) { + this.deviceList[i] = data.device; break; - default: - break; + } } - }); - this.#deviceManager.on('deviceFound', (data) => { - console.info('MusicPlayer[RemoteDeviceModel] deviceFound data=' + JSON.stringify(data)); - console.info('MusicPlayer[RemoteDeviceModel] deviceFound this.deviceList=' + this.deviceList); - console.info('MusicPlayer[RemoteDeviceModel] deviceFound this.deviceList.length=' + this.deviceList.length); - for (var i = 0; i < this.discoverList.length; i++) { - if (this.discoverList[i].deviceId === data.device.deviceId) { - console.info('MusicPlayer[RemoteDeviceModel] device founded, ignored'); - return; - } + } + console.info('MusicPlayer[RemoteDeviceModel] change, updated device list=' + JSON.stringify(this.deviceList)); + this.callback(); + break; + case 1: + if (this.deviceList.length > 0) { + var list = []; + for (var i = 0; i < this.deviceList.length; i++) { + if (this.deviceList[i].deviceId != data.device.deviceId) { + list[i] = data.device; + } } - this.discoverList[this.discoverList.length] = data.device; - this.callback(); - }); - this.#deviceManager.on('discoverFail', (data) => { - console.info('MusicPlayer[RemoteDeviceModel] discoverFail data=' + JSON.stringify(data)); - }); - this.#deviceManager.on('serviceDie', () => { - console.error('MusicPlayer[RemoteDeviceModel] serviceDie'); - }); + this.deviceList = list; + } + console.info('MusicPlayer[RemoteDeviceModel] offline, updated device list=' + JSON.stringify(data.device)); + this.callback(); + break; + default: + break; + } + }); + this.#deviceManager.on('deviceFound', (data) => { + console.info('MusicPlayer[RemoteDeviceModel] deviceFound data=' + JSON.stringify(data)); + console.info('MusicPlayer[RemoteDeviceModel] deviceFound this.deviceList=' + this.deviceList); + console.info('MusicPlayer[RemoteDeviceModel] deviceFound this.deviceList.length=' + this.deviceList.length); + for (var i = 0; i < this.discoverList.length; i++) { + if (this.discoverList[i].deviceId === data.device.deviceId) { + console.info('MusicPlayer[RemoteDeviceModel] device founded, ignored'); + return; + } + } + this.discoverList[this.discoverList.length] = data.device; + this.callback(); + }); + this.#deviceManager.on('discoverFail', (data) => { + console.info('MusicPlayer[RemoteDeviceModel] discoverFail data=' + JSON.stringify(data)); + }); + this.#deviceManager.on('serviceDie', () => { + console.error('MusicPlayer[RemoteDeviceModel] serviceDie'); + }); - SUBSCRIBE_ID = Math.floor(65536 * Math.random()); - var info = { - subscribeId: SUBSCRIBE_ID, - mode: 0xAA, - medium: 2, - freq: 2, - isSameAccount: false, - isWakeRemote: true, - capability: 0 - }; - console.info('MusicPlayer[RemoteDeviceModel] startDeviceDiscovery ' + SUBSCRIBE_ID); - this.#deviceManager.startDeviceDiscovery(info); - } + SUBSCRIBE_ID = Math.floor(65536 * Math.random()); + var info = { + subscribeId: SUBSCRIBE_ID, + mode: 0xAA, + medium: 2, + freq: 2, + isSameAccount: false, + isWakeRemote: true, + capability: 0 + }; + console.info('MusicPlayer[RemoteDeviceModel] startDeviceDiscovery ' + SUBSCRIBE_ID); + this.#deviceManager.startDeviceDiscovery(info); + } - authDevice(deviceId, callback) { - console.info('MusicPlayer[RemoteDeviceModel] authDevice ' + deviceId); - for (var i = 0; i < this.discoverList.length; i++) { - if (this.discoverList[i].deviceId === deviceId) { - console.info('MusicPlayer[RemoteDeviceModel] device founded, ignored'); - let extraInfo = { - "targetPkgName": 'ohos.samples.distributedmusicplayer', - "appName": 'Music', - "appDescription": 'Music player application', - "business": '0' - }; - let authParam = { - "authType": 1, - "appIcon": '', - "appThumbnail": '', - "extraInfo": extraInfo - }; - console.info('MusicPlayer[RemoteDeviceModel] authenticateDevice ' + JSON.stringify(this.discoverList[i])); - this.#deviceManager.authenticateDevice(this.discoverList[i], authParam, (err, data) => { - if (err) { - console.info('MusicPlayer[RemoteDeviceModel] authenticateDevice failed, err=' + JSON.stringify(err)); - this.authCallback = null; - } else { - console.info('MusicPlayer[RemoteDeviceModel] authenticateDevice succeed, data=' + JSON.stringify(data)); - this.authCallback = callback; - } - }); - } - } + authDevice(deviceId, callback) { + console.info('MusicPlayer[RemoteDeviceModel] authDevice ' + deviceId); + for (var i = 0; i < this.discoverList.length; i++) { + if (this.discoverList[i].deviceId === deviceId) { + console.info('MusicPlayer[RemoteDeviceModel] device founded, ignored'); + let extraInfo = { + "targetPkgName": 'ohos.samples.distributedmusicplayer', + "appName": 'Music', + "appDescription": 'Music player application', + "business": '0' + }; + let authParam = { + "authType": 1, + "appIcon": '', + "appThumbnail": '', + "extraInfo": extraInfo + }; + console.info('MusicPlayer[RemoteDeviceModel] authenticateDevice ' + JSON.stringify(this.discoverList[i])); + this.#deviceManager.authenticateDevice(this.discoverList[i], authParam, (err, data) => { + if (err) { + console.info('MusicPlayer[RemoteDeviceModel] authenticateDevice failed, err=' + JSON.stringify(err)); + this.authCallback = null; + } else { + console.info('MusicPlayer[RemoteDeviceModel] authenticateDevice succeed, data=' + JSON.stringify(data)); + this.authCallback = callback; + } + }); + } } + } - unregisterDeviceListCallback() { - console.info('MusicPlayer[RemoteDeviceModel] stopDeviceDiscovery ' + SUBSCRIBE_ID); - if(typeof (this.#deviceManager) === 'undefined'){ - return - } - this.#deviceManager.stopDeviceDiscovery(SUBSCRIBE_ID); - this.#deviceManager.off('deviceStateChange'); - this.#deviceManager.off('deviceFound'); - this.#deviceManager.off('discoverFail'); - this.#deviceManager.off('serviceDie'); - this.deviceList = []; + unregisterDeviceListCallback() { + console.info('MusicPlayer[RemoteDeviceModel] stopDeviceDiscovery ' + SUBSCRIBE_ID); + if (typeof (this.#deviceManager) === 'undefined') { + return } + this.#deviceManager.stopDeviceDiscovery(SUBSCRIBE_ID); + this.#deviceManager.off('deviceStateChange'); + this.#deviceManager.off('deviceFound'); + this.#deviceManager.off('discoverFail'); + this.#deviceManager.off('serviceDie'); + this.deviceList = []; + } } \ No newline at end of file diff --git a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.hml b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.hml index 14de1e58b..2bbf617e3 100644 --- a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.hml @@ -14,48 +14,48 @@ */-->
-
- - {{ title }} +
+ + {{ title }} + +
+ + +
+
+
+ {{ currentTimeText }} + + {{ totalTimeText }} -
- - -
-
-
- {{ currentTimeText }} - - {{ totalTimeText }} - -
- -
-
- - - - -
+
+ +
+
+ + + + +
+
+ +
+ {{ $t('strings.select') }} + + +
+ + +
+
+
+
+ +
- -
- {{ $t('strings.select') }} - - -
- - -
-
-
-
- -
-
-
+
diff --git a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.js b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.js index 9a253272a..118420a7a 100644 --- a/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.js +++ b/ability/JsDistributedMusicPlayer/entry/src/main/js/MainAbility/pages/index/index.js @@ -20,16 +20,16 @@ import KvStoreModel from '../../model/KvStoreModel.js'; import display from '@ohos.display'; function getShownTimer(ms) { - var seconds = Math.floor(ms / 1000); - var sec = seconds % 60; - var min = (seconds - sec) / 60; - if (sec < 10) { - sec = '0' + sec; - } - if (min < 10) { - min = '0' + min; - } - return min + ':' + sec; + var seconds = Math.floor(ms / 1000); + var sec = seconds % 60; + var min = (seconds - sec) / 60; + if (sec < 10) { + sec = '0' + sec; + } + if (min < 10) { + min = '0' + min; + } + return min + ':' + sec; } const REMOTE_ABILITY_STARTED = 'remoteAbilityStarted'; @@ -39,336 +39,336 @@ const DESIGN_WIDTH = 720.0; const DESIGN_RATIO = 16 / 9; export default { - data: { - title: '', - currentTimeText: '', - totalTimeText: '', - totalMs: 0, - currentProgress: 0, - deviceList: [], - btnPlaySrc: '/common/media/ic_play.svg', - albumSrc: '/common/media/album.png', - remoteDeviceModel: new RemoteDeviceModel(), - playerModel: new PlayerModel(), - kvStoreModel: new KvStoreModel(), - isDialogShowing: false, - isSwitching: false, - riscale: 1, // ratio independent scale ratio - risw: 720, // ratio independent screen width - rish: 1280, // ratio independent screen height - hasInitialized: false, - }, - onInit() { - console.info('MusicPlayer[IndexPage] onInit begin'); - this.grantPermission() - console.info("MusicPlayer[IndexPage] getDefaultDisplay begin"); - display.getDefaultDisplay().then(dis => { - console.info("MusicPlayer[IndexPage] getDefaultDisplay dis=" + JSON.stringify(dis)); - var proportion = DESIGN_WIDTH / dis.width; - var screenWidth = DESIGN_WIDTH; - var screenHeight = (dis.height - SYSTEM_UI_HEIGHT) * proportion; - this.riscale = (screenHeight / screenWidth) / DESIGN_RATIO; - if (this.riscale < 1) { - // The screen ratio is shorter than design ratio - this.risw = screenWidth * this.riscale; - this.rish = screenHeight; - } else { - // The screen ratio is longer than design ratio - this.risw = screenWidth; - this.rish = screenHeight / this.riscale; - } - this.hasInitialized = true; - console.info("MusicPlayer[IndexPage] proportion=" + proportion + ", screenWidth=" - + screenWidth + ", screenHeight=" + screenHeight + ", riscale=" + this.riscale - + ", risw=" + this.risw + ", rish=" + this.rish); - }); - console.info("MusicPlayer[IndexPage] getDefaultDisplay end"); - DEVICE_LIST_LOCALHOST = { - name: this.$t('strings.localhost'), - id: 'localhost', - }; - this.deviceList = [DEVICE_LIST_LOCALHOST]; + data: { + title: '', + currentTimeText: '', + totalTimeText: '', + totalMs: 0, + currentProgress: 0, + deviceList: [], + btnPlaySrc: '/common/media/ic_play.svg', + albumSrc: '/common/media/album.png', + remoteDeviceModel: new RemoteDeviceModel(), + playerModel: new PlayerModel(), + kvStoreModel: new KvStoreModel(), + isDialogShowing: false, + isSwitching: false, + riscale: 1, // ratio independent scale ratio + risw: 720, // ratio independent screen width + rish: 1280, // ratio independent screen height + hasInitialized: false, + }, + onInit() { + console.info('MusicPlayer[IndexPage] onInit begin'); + this.grantPermission() + console.info("MusicPlayer[IndexPage] getDefaultDisplay begin"); + display.getDefaultDisplay().then(dis => { + console.info("MusicPlayer[IndexPage] getDefaultDisplay dis=" + JSON.stringify(dis)); + var proportion = DESIGN_WIDTH / dis.width; + var screenWidth = DESIGN_WIDTH; + var screenHeight = (dis.height - SYSTEM_UI_HEIGHT) * proportion; + this.riscale = (screenHeight / screenWidth) / DESIGN_RATIO; + if (this.riscale < 1) { + // The screen ratio is shorter than design ratio + this.risw = screenWidth * this.riscale; + this.rish = screenHeight; + } else { + // The screen ratio is longer than design ratio + this.risw = screenWidth; + this.rish = screenHeight / this.riscale; + } + this.hasInitialized = true; + console.info("MusicPlayer[IndexPage] proportion=" + proportion + ", screenWidth=" + + screenWidth + ", screenHeight=" + screenHeight + ", riscale=" + this.riscale + + ", risw=" + this.risw + ", rish=" + this.rish); + }); + console.info("MusicPlayer[IndexPage] getDefaultDisplay end"); + DEVICE_LIST_LOCALHOST = { + name: this.$t('strings.localhost'), + id: 'localhost', + }; + this.deviceList = [DEVICE_LIST_LOCALHOST]; - this.currentTimeText = getShownTimer(0); - this.playerModel.setOnStatusChangedListener((isPlaying) => { - console.info('MusicPlayer[IndexPage] on player status changed, isPlaying=' + isPlaying + ', refresh ui'); - this.playerModel.setOnPlayingProgressListener((currentTimeMs) => { - this.currentTimeText = getShownTimer(currentTimeMs); - this.currentProgress = Math.floor(currentTimeMs / this.totalMs * 100); + this.currentTimeText = getShownTimer(0); + this.playerModel.setOnStatusChangedListener((isPlaying) => { + console.info('MusicPlayer[IndexPage] on player status changed, isPlaying=' + isPlaying + ', refresh ui'); + this.playerModel.setOnPlayingProgressListener((currentTimeMs) => { + this.currentTimeText = getShownTimer(currentTimeMs); + this.currentProgress = Math.floor(currentTimeMs / this.totalMs * 100); + }); + if (isPlaying) { + this.btnPlaySrc = '/common/media/ic_pause.svg'; + } else { + this.btnPlaySrc = '/common/media/ic_play.svg'; + } + }); + this.playerModel.getPlaylist(() => { + console.info('MusicPlayer[IndexPage] on playlist generated, refresh ui'); + this.restoreFromWant(); + }); + console.info('MusicPlayer[IndexPage] onInit end'); + }, + grantPermission() { + console.info('MusicPlayer[IndexPage] grantPermission') + let context = featureAbility.getContext() + context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'], 666, function (result) { + console.info(`MusicPlayer[IndexPage] grantPermission,requestPermissionsFromUser,result.requestCode=${result.requestCode}`) + }) + }, + restoreFromWant() { + featureAbility.getWant((error, want) => { + console.info('MusicPlayer[IndexPage] featureAbility.getWant=' + JSON.stringify(want)); + var status = want.parameters; + if (status != null && status.uri != null) { + this.kvStoreModel.broadcastMessage(REMOTE_ABILITY_STARTED); + console.info('MusicPlayer[IndexPage] restorePlayingStatus'); + this.playerModel.restorePlayingStatus(status, (index) => { + console.info('MusicPlayer[IndexPage] restorePlayingStatus finished, index=' + index); + if (index >= 0) { + this.refreshSongInfo(index); + } else { + this.playerModel.preLoad(0, () => { + this.refreshSongInfo(0); }); - if (isPlaying) { - this.btnPlaySrc = '/common/media/ic_pause.svg'; - } else { - this.btnPlaySrc = '/common/media/ic_play.svg'; - } + } }); - this.playerModel.getPlaylist(() => { - console.info('MusicPlayer[IndexPage] on playlist generated, refresh ui'); - this.restoreFromWant(); + } else { + this.playerModel.preLoad(0, () => { + this.refreshSongInfo(0); }); - console.info('MusicPlayer[IndexPage] onInit end'); - }, - grantPermission() { - console.info('MusicPlayer[IndexPage] grantPermission') - let context = featureAbility.getContext() - context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'], 666, function (result) { - console.info(`MusicPlayer[IndexPage] grantPermission,requestPermissionsFromUser,result.requestCode=${result.requestCode}`) - }) - }, - restoreFromWant() { - featureAbility.getWant((error, want) => { - console.info('MusicPlayer[IndexPage] featureAbility.getWant=' + JSON.stringify(want)); - var status = want.parameters; - if (status != null && status.uri != null) { - this.kvStoreModel.broadcastMessage(REMOTE_ABILITY_STARTED); - console.info('MusicPlayer[IndexPage] restorePlayingStatus'); - this.playerModel.restorePlayingStatus(status, (index) => { - console.info('MusicPlayer[IndexPage] restorePlayingStatus finished, index=' + index); - if (index >= 0) { - this.refreshSongInfo(index); - } else { - this.playerModel.preLoad(0, () => { - this.refreshSongInfo(0); - }); - } - }); - } else { - this.playerModel.preLoad(0, () => { - this.refreshSongInfo(0); - }); - } - }); - }, - onNewRequest() { - console.info('MusicPlayer[IndexPage] onNewRequest'); - this.playerModel.pause(); - this.playerModel.seek(0); - this.restoreFromWant(); - }, - onBackPress() { - console.info('MusicPlayer[IndexPage] onBackPress isDialogShowing=' + this.isDialogShowing); - if (this.isDialogShowing === true) { - this.dismissDialog(); - return true; - } - return false; - }, - onDestroy() { - console.info('MusicPlayer[IndexPage] onDestroy begin'); - if (this.playerModel === undefined) { - return - } - this.playerModel.release(); - this.remoteDeviceModel.unregisterDeviceListCallback(); - console.info('MusicPlayer[IndexPage] onDestroy end'); - }, - refreshSongInfo(index) { - console.info('MusicPlayer[IndexPage] refreshSongInfo ' + index + '/' - + this.playerModel.playlist.audioFiles.length); - if (index >= this.playerModel.playlist.audioFiles.length) { - console.warn('MusicPlayer[IndexPage] refreshSongInfo ignored'); - return; - } - // update song title - this.title = this.playerModel.playlist.audioFiles[index].name; - this.albumSrc = (index % 2 === 0) ? '/common/media/album.png' : '/common/media/album2.png'; + } + }); + }, + onNewRequest() { + console.info('MusicPlayer[IndexPage] onNewRequest'); + this.playerModel.pause(); + this.playerModel.seek(0); + this.restoreFromWant(); + }, + onBackPress() { + console.info('MusicPlayer[IndexPage] onBackPress isDialogShowing=' + this.isDialogShowing); + if (this.isDialogShowing === true) { + this.dismissDialog(); + return true; + } + return false; + }, + onDestroy() { + console.info('MusicPlayer[IndexPage] onDestroy begin'); + if (this.playerModel === undefined) { + return + } + this.playerModel.release(); + this.remoteDeviceModel.unregisterDeviceListCallback(); + console.info('MusicPlayer[IndexPage] onDestroy end'); + }, + refreshSongInfo(index) { + console.info('MusicPlayer[IndexPage] refreshSongInfo ' + index + '/' + + this.playerModel.playlist.audioFiles.length); + if (index >= this.playerModel.playlist.audioFiles.length) { + console.warn('MusicPlayer[IndexPage] refreshSongInfo ignored'); + return; + } + // update song title + this.title = this.playerModel.playlist.audioFiles[index].name; + this.albumSrc = (index % 2 === 0) ? '/common/media/album.png' : '/common/media/album2.png'; - // update duration - this.totalMs = this.playerModel.getDuration(); - this.totalTimeText = getShownTimer(this.totalMs); - this.currentTimeText = getShownTimer(this.playerModel.getCurrentMs()); + // update duration + this.totalMs = this.playerModel.getDuration(); + this.totalTimeText = getShownTimer(this.totalMs); + this.currentTimeText = getShownTimer(this.playerModel.getCurrentMs()); - console.info('MusicPlayer[IndexPage] refreshSongInfo this.title=' + this.title + ' this.totalMs=' - + this.totalMs + ' this.totalTimeText=' + this.totalTimeText + ' this.currentTimeText=' + this.currentTimeText); - }, - setProgress(e) { - console.info('MusicPlayer[IndexPage] setProgress ' + e.mode + ', ' + e.value); - this.currentProgress = e.value; - if (isNaN(this.totalMs)) { - this.currentProgress = 0; - console.info('MusicPlayer[IndexPage] setProgress ignored, totalMs=' + this.totalMs); - return; - } - var currentMs = this.currentProgress / 100 * this.totalMs; - this.currentTimeText = getShownTimer(currentMs); - if (e.mode === 'end' || e.mode === 'click') { - console.info('MusicPlayer[IndexPage] player.seek ' + currentMs); - this.playerModel.seek(currentMs); - } - }, - onPreviousClick() { - if (this.isSwitching) { - console.info('MusicPlayer[IndexPage] onPreviousClick ignored, isSwitching'); - return; - } - console.info('MusicPlayer[IndexPage] onPreviousClick'); - this.playerModel.index--; - if (this.playerModel.index < 0 && this.playerModel.playlist.audioFiles.length >= 1) { - this.playerModel.index = this.playerModel.playlist.audioFiles.length - 1; - } - this.currentProgress = 0; - this.isSwitching = true; - this.playerModel.preLoad(this.playerModel.index, () => { - this.refreshSongInfo(this.playerModel.index); - this.playerModel.play(0, true); - this.isSwitching = false; - }); - }, - onNextClick() { - if (this.isSwitching) { - console.info('MusicPlayer[IndexPage] onNextClick ignored, isSwitching'); - return; - } - console.info('MusicPlayer[IndexPage] onNextClick'); - this.playerModel.index++; - if (this.playerModel.index >= this.playerModel.playlist.audioFiles.length) { - this.playerModel.index = 0; - } - this.currentProgress = 0; - this.isSwitching = true; - this.playerModel.preLoad(this.playerModel.index, () => { - this.refreshSongInfo(this.playerModel.index); - this.playerModel.play(0, true); - this.isSwitching = false; - }); - }, - onPlayClick() { - if (this.isSwitching) { - console.info('MusicPlayer[IndexPage] onPlayClick ignored, isSwitching'); - return; - } - console.info('MusicPlayer[IndexPage] onPlayClick, isPlaying=' + this.playerModel.isPlaying); - if (this.playerModel.isPlaying) { - this.playerModel.pause(); - } else { - this.playerModel.preLoad(this.playerModel.index, () => { - this.playerModel.play(-1, true); - }); - } - }, - onContinueAbilityClick() { - console.info('MusicPlayer[IndexPage] onContinueAbilityClick begin'); - this.remoteDeviceModel.registerDeviceListCallback(() => { - console.info('MusicPlayer[IndexPage] registerDeviceListCallback, callback entered'); - var list = []; - list[0] = DEVICE_LIST_LOCALHOST; - var deviceList; - if (this.remoteDeviceModel.discoverList.length > 0) { - deviceList = this.remoteDeviceModel.discoverList; - } else { - deviceList = this.remoteDeviceModel.deviceList; - } - console.info('MusicPlayer[IndexPage] on remote device updated, count=' + deviceList.length); - for (var i = 0; i < deviceList.length; i++) { - console.info('MusicPlayer[IndexPage] device ' + i + '/' + deviceList.length + ' deviceId=' - + deviceList[i].deviceId + ' deviceName=' + deviceList[i].deviceName + ' deviceType=' - + deviceList[i].deviceType); - list[i + 1] = { - name: deviceList[i].deviceName, - id: deviceList[i].deviceId, - }; - } - this.deviceList = list; - }); - this.$element('continueAbilityDialog').show(); - this.isDialogShowing = true; - console.info('MusicPlayer[IndexPage] onContinueAbilityClick end'); - }, - startAbilityContinuation(deviceId, deviceName) { + console.info('MusicPlayer[IndexPage] refreshSongInfo this.title=' + this.title + ' this.totalMs=' + + this.totalMs + ' this.totalTimeText=' + this.totalTimeText + ' this.currentTimeText=' + this.currentTimeText); + }, + setProgress(e) { + console.info('MusicPlayer[IndexPage] setProgress ' + e.mode + ', ' + e.value); + this.currentProgress = e.value; + if (isNaN(this.totalMs)) { + this.currentProgress = 0; + console.info('MusicPlayer[IndexPage] setProgress ignored, totalMs=' + this.totalMs); + return; + } + var currentMs = this.currentProgress / 100 * this.totalMs; + this.currentTimeText = getShownTimer(currentMs); + if (e.mode === 'end' || e.mode === 'click') { + console.info('MusicPlayer[IndexPage] player.seek ' + currentMs); + this.playerModel.seek(currentMs); + } + }, + onPreviousClick() { + if (this.isSwitching) { + console.info('MusicPlayer[IndexPage] onPreviousClick ignored, isSwitching'); + return; + } + console.info('MusicPlayer[IndexPage] onPreviousClick'); + this.playerModel.index--; + if (this.playerModel.index < 0 && this.playerModel.playlist.audioFiles.length >= 1) { + this.playerModel.index = this.playerModel.playlist.audioFiles.length - 1; + } + this.currentProgress = 0; + this.isSwitching = true; + this.playerModel.preLoad(this.playerModel.index, () => { + this.refreshSongInfo(this.playerModel.index); + this.playerModel.play(0, true); + this.isSwitching = false; + }); + }, + onNextClick() { + if (this.isSwitching) { + console.info('MusicPlayer[IndexPage] onNextClick ignored, isSwitching'); + return; + } + console.info('MusicPlayer[IndexPage] onNextClick'); + this.playerModel.index++; + if (this.playerModel.index >= this.playerModel.playlist.audioFiles.length) { + this.playerModel.index = 0; + } + this.currentProgress = 0; + this.isSwitching = true; + this.playerModel.preLoad(this.playerModel.index, () => { + this.refreshSongInfo(this.playerModel.index); + this.playerModel.play(0, true); + this.isSwitching = false; + }); + }, + onPlayClick() { + if (this.isSwitching) { + console.info('MusicPlayer[IndexPage] onPlayClick ignored, isSwitching'); + return; + } + console.info('MusicPlayer[IndexPage] onPlayClick, isPlaying=' + this.playerModel.isPlaying); + if (this.playerModel.isPlaying) { + this.playerModel.pause(); + } else { + this.playerModel.preLoad(this.playerModel.index, () => { + this.playerModel.play(-1, true); + }); + } + }, + onContinueAbilityClick() { + console.info('MusicPlayer[IndexPage] onContinueAbilityClick begin'); + this.remoteDeviceModel.registerDeviceListCallback(() => { + console.info('MusicPlayer[IndexPage] registerDeviceListCallback, callback entered'); + var list = []; + list[0] = DEVICE_LIST_LOCALHOST; + var deviceList; + if (this.remoteDeviceModel.discoverList.length > 0) { + deviceList = this.remoteDeviceModel.discoverList; + } else { + deviceList = this.remoteDeviceModel.deviceList; + } + console.info('MusicPlayer[IndexPage] on remote device updated, count=' + deviceList.length); + for (var i = 0; i < deviceList.length; i++) { + console.info('MusicPlayer[IndexPage] device ' + i + '/' + deviceList.length + ' deviceId=' + + deviceList[i].deviceId + ' deviceName=' + deviceList[i].deviceName + ' deviceType=' + + deviceList[i].deviceType); + list[i + 1] = { + name: deviceList[i].deviceName, + id: deviceList[i].deviceId, + }; + } + this.deviceList = list; + }); + this.$element('continueAbilityDialog').show(); + this.isDialogShowing = true; + console.info('MusicPlayer[IndexPage] onContinueAbilityClick end'); + }, + startAbilityContinuation(deviceId, deviceName) { + this.$element('continueAbilityDialog').close(); + var params; + if (this.playerModel.index >= 0 && this.playerModel.index <= this.playerModel.playlist.audioFiles.length) { + params = { + uri: this.playerModel.playlist.audioFiles[this.playerModel.index].fileUri, + seekTo: this.playerModel.getCurrentMs(), + isPlaying: this.playerModel.isPlaying + }; + } else { + params = { + uri: '', + seekTo: 0, + isPlaying: false + }; + } + console.info('MusicPlayer[IndexPage] featureAbility.startAbility deviceId=' + deviceId + + ' deviceName=' + deviceName); + var wantValue = { + bundleName: 'ohos.samples.distributedmusicplayer', + abilityName: 'ohos.samples.distributedmusicplayer.MainAbility', + deviceId: deviceId, + parameters: params + }; + var timerId = setTimeout(() => { + console.info('MusicPlayer[IndexPage] onMessageReceiveTimeout, terminateSelf'); + featureAbility.terminateSelf((error) => { + console.info('MusicPlayer[IndexPage] terminateSelf finished, error=' + error); + }); + }, 3000); + this.kvStoreModel.setOnMessageReceivedListener(REMOTE_ABILITY_STARTED, () => { + console.info('MusicPlayer[IndexPage] OnMessageReceived, terminateSelf'); + clearTimeout(timerId); + featureAbility.terminateSelf((error) => { + console.info('MusicPlayer[IndexPage] terminateSelf finished, error=' + error); + }); + }); + featureAbility.startAbility({ + want: wantValue + }).then((data) => { + console.info('MusicPlayer[IndexPage] featureAbility.startAbility finished, ' + JSON.stringify(data)); + }); + console.info('MusicPlayer[IndexPage] featureAbility.startAbility want=' + JSON.stringify(wantValue)); + console.info('MusicPlayer[IndexPage] featureAbility.startAbility end'); + }, + onRadioChange(inputValue, e) { + console.info('MusicPlayer[IndexPage] onRadioChange ' + inputValue + ', ' + e.value); + if (inputValue === e.value) { + if (e.value === 'localhost') { this.$element('continueAbilityDialog').close(); - var params; - if (this.playerModel.index >= 0 && this.playerModel.index <= this.playerModel.playlist.audioFiles.length) { - params = { - uri: this.playerModel.playlist.audioFiles[this.playerModel.index].fileUri, - seekTo: this.playerModel.getCurrentMs(), - isPlaying: this.playerModel.isPlaying - }; - } else { - params = { - uri: '', - seekTo: 0, - isPlaying: false - }; + return; + } + if (this.remoteDeviceModel.discoverList.length > 0) { + console.info('MusicPlayer[IndexPage] continue to unauthed device'); + var name = null; + for (var i = 0; i < this.remoteDeviceModel.discoverList.length; i++) { + if (this.remoteDeviceModel.discoverList[i].deviceId === e.value) { + name = this.remoteDeviceModel.discoverList[i].deviceName; + break; + } } - console.info('MusicPlayer[IndexPage] featureAbility.startAbility deviceId=' + deviceId - + ' deviceName=' + deviceName); - var wantValue = { - bundleName: 'ohos.samples.distributedmusicplayer', - abilityName: 'ohos.samples.distributedmusicplayer.MainAbility', - deviceId: deviceId, - parameters: params - }; - var timerId = setTimeout(() => { - console.info('MusicPlayer[IndexPage] onMessageReceiveTimeout, terminateSelf'); - featureAbility.terminateSelf((error) => { - console.info('MusicPlayer[IndexPage] terminateSelf finished, error=' + error); - }); - }, 3000); - this.kvStoreModel.setOnMessageReceivedListener(REMOTE_ABILITY_STARTED, () => { - console.info('MusicPlayer[IndexPage] OnMessageReceived, terminateSelf'); - clearTimeout(timerId); - featureAbility.terminateSelf((error) => { - console.info('MusicPlayer[IndexPage] terminateSelf finished, error=' + error); - }); - }); - featureAbility.startAbility({ - want: wantValue - }).then((data) => { - console.info('MusicPlayer[IndexPage] featureAbility.startAbility finished, ' + JSON.stringify(data)); - }); - console.info('MusicPlayer[IndexPage] featureAbility.startAbility want=' + JSON.stringify(wantValue)); - console.info('MusicPlayer[IndexPage] featureAbility.startAbility end'); - }, - onRadioChange(inputValue, e) { - console.info('MusicPlayer[IndexPage] onRadioChange ' + inputValue + ', ' + e.value); - if (inputValue === e.value) { - if (e.value === 'localhost') { - this.$element('continueAbilityDialog').close(); - return; - } - if (this.remoteDeviceModel.discoverList.length > 0) { - console.info('MusicPlayer[IndexPage] continue to unauthed device'); - var name = null; - for (var i = 0; i < this.remoteDeviceModel.discoverList.length; i++) { - if (this.remoteDeviceModel.discoverList[i].deviceId === e.value) { - name = this.remoteDeviceModel.discoverList[i].deviceName; - break; - } - } - if (name == null) { - console.error('MusicPlayer[IndexPage] onRadioChange failed, can not get name from discoverList'); - return; - } - console.info('MusicPlayer[IndexPage] onRadioChange name=' + name); + if (name == null) { + console.error('MusicPlayer[IndexPage] onRadioChange failed, can not get name from discoverList'); + return; + } + console.info('MusicPlayer[IndexPage] onRadioChange name=' + name); - this.remoteDeviceModel.authDevice(e.value, () => { - console.info('MusicPlayer[IndexPage] auth and online finished'); - for (i = 0; i < this.remoteDeviceModel.deviceList.length; i++) { - if (this.remoteDeviceModel.deviceList[i].deviceName === name) { - this.startAbilityContinuation(this.remoteDeviceModel.deviceList[i].deviceId, this.remoteDeviceModel.deviceList[i].deviceName); - } - } - }); - } else { - console.info('MusicPlayer[IndexPage] continue to authed device'); - for (i = 0; i < this.remoteDeviceModel.deviceList.length; i++) { - if (this.remoteDeviceModel.deviceList[i].deviceId === e.value) { - this.startAbilityContinuation(this.remoteDeviceModel.deviceList[i].deviceId, this.remoteDeviceModel.deviceList[i].deviceName); - } - } + this.remoteDeviceModel.authDevice(e.value, () => { + console.info('MusicPlayer[IndexPage] auth and online finished'); + for (i = 0; i < this.remoteDeviceModel.deviceList.length; i++) { + if (this.remoteDeviceModel.deviceList[i].deviceName === name) { + this.startAbilityContinuation(this.remoteDeviceModel.deviceList[i].deviceId, this.remoteDeviceModel.deviceList[i].deviceName); } + } + }); + } else { + console.info('MusicPlayer[IndexPage] continue to authed device'); + for (i = 0; i < this.remoteDeviceModel.deviceList.length; i++) { + if (this.remoteDeviceModel.deviceList[i].deviceId === e.value) { + this.startAbilityContinuation(this.remoteDeviceModel.deviceList[i].deviceId, this.remoteDeviceModel.deviceList[i].deviceName); + } } - }, - cancelDialog(e) { - this.remoteDeviceModel.unregisterDeviceListCallback(); - this.isDialogShowing = false; - }, - onDismissDialogClicked(e) { - this.dismissDialog(); - }, - dismissDialog() { - this.$element('continueAbilityDialog').close(); - this.remoteDeviceModel.unregisterDeviceListCallback(); - this.isDialogShowing = false; + } } + }, + cancelDialog(e) { + this.remoteDeviceModel.unregisterDeviceListCallback(); + this.isDialogShowing = false; + }, + onDismissDialogClicked(e) { + this.dismissDialog(); + }, + dismissDialog() { + this.$element('continueAbilityDialog').close(); + this.remoteDeviceModel.unregisterDeviceListCallback(); + this.isDialogShowing = false; + } }; diff --git a/common/AirQuality/.gitignore b/common/AirQuality/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/common/AirQuality/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/common/AirQuality/README_zh.md b/common/AirQuality/README_zh.md index 8fb746695..bb77546ac 100644 --- a/common/AirQuality/README_zh.md +++ b/common/AirQuality/README_zh.md @@ -26,7 +26,7 @@ chart:图表组件,用于呈现线形图、柱状图、量规图界面。 1.本示例支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 3.如果安装本示例报错为error:install sign info inconsistent,则有可能本应用被设置为系统预置应用,已安装在系统中,此时需使用命令进行替换安装,并在替换安装后对设备进行重启操作,具体命令如下: diff --git a/common/AirQuality/entry/src/main/js/default/app.js b/common/AirQuality/entry/src/main/js/default/app.js index 50449ecbe..8f942067b 100644 --- a/common/AirQuality/entry/src/main/js/default/app.js +++ b/common/AirQuality/entry/src/main/js/default/app.js @@ -13,10 +13,10 @@ * limitations under the License. */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/common/AirQuality/entry/src/main/js/default/pages/index/index.css b/common/AirQuality/entry/src/main/js/default/pages/index/index.css index c385c6623..cd4b36230 100644 --- a/common/AirQuality/entry/src/main/js/default/pages/index/index.css +++ b/common/AirQuality/entry/src/main/js/default/pages/index/index.css @@ -61,11 +61,13 @@ height: 50px; font-size: 35px; } + .progress-div { width: 320px; height: 220px; flex-direction: column; } + .progress { width: 100%; height: 100%; @@ -83,13 +85,13 @@ stroke-width: 20px; width: 100%; height: 100%; - top:5px; + top: 5px; } .mask-layer { width: 100%; height: 100%; - top:10px; + top: 10px; flex-direction: column; } @@ -164,7 +166,7 @@ width: 100%; height: 100%; flex-direction: row; - flex-wrap:wrap; + flex-wrap: wrap; align-items: center; justify-content: center; } diff --git a/common/AirQuality/entry/src/main/js/default/pages/index/index.hml b/common/AirQuality/entry/src/main/js/default/pages/index/index.hml index f8529da6a..b3afd7803 100644 --- a/common/AirQuality/entry/src/main/js/default/pages/index/index.hml +++ b/common/AirQuality/entry/src/main/js/default/pages/index/index.hml @@ -13,108 +13,108 @@ See the License for the specific language governing permissions and limitations under the License. -->
-
- - {{ $t('strings.title') }} -
- - - -
-
- - {{ airData[0].location }} - - - - -
- AQI - {{ airData[0].detailData }} - {{ airData[0].airQuality }} - -
-
-
-
-
- CO - 100 -
-
- NO2 - 90 -
-
- PM10 - 120 -
-
- PM2.5 - 40 -
-
- SO2 - 150 -
-
-
- -
- -
-
-
- - {{ airData[1].location }} - - - - -
- AQI - {{ airData[1].detailData }} - {{ airData[1].airQuality }} - -
-
-
-
-
- CO - 100 -
-
- NO2 - 90 -
-
- PM10 - 120 -
-
- PM2.5 - 40 -
-
- SO2 - 150 -
-
- - -
-
-
-
+
+ + {{ $t('strings.title') }} +
+ + + +
+
+ + {{ airData[0].location }} + + + + +
+ AQI + {{ airData[0].detailData }} + {{ airData[0].airQuality }} + +
+
+
+
+
+ CO + 100 +
+
+ NO2 + 90 +
+
+ PM10 + 120 +
+
+ PM2.5 + 40 +
+
+ SO2 + 150 +
+
+
+ +
+ +
+
+
+ + {{ airData[1].location }} + + + + +
+ AQI + {{ airData[1].detailData }} + {{ airData[1].airQuality }} + +
+
+
+
+
+ CO + 100 +
+
+ NO2 + 90 +
+
+ PM10 + 120 +
+
+ PM2.5 + 40 +
+
+ SO2 + 150 +
+
+ + +
+
+
+
diff --git a/common/AirQuality/entry/src/main/js/default/pages/index/index.js b/common/AirQuality/entry/src/main/js/default/pages/index/index.js index d06306b65..506962cf9 100644 --- a/common/AirQuality/entry/src/main/js/default/pages/index/index.js +++ b/common/AirQuality/entry/src/main/js/default/pages/index/index.js @@ -16,82 +16,82 @@ import router from '@ohos.router'; import app from '@system.app'; export default { - data: { - textColor1: '#00ff00', - textColor2: '#00ff00', - bgColor1: '#669966', - bgColor2: '#669966', - swiperPage: 0, - percent1: 40, - percent2: 90, - iconcheckedBR: '6px', - iconcheckedColor: '#ffffff', - iconUncheckedColor: '#262626', - src1: '/common/cloud_green.png', - src2: '/common/cloud_green.png', - airData: [{ - location: '东莞', - airQuality: '良', - detailData: 40 - }, { - location: '深圳', - airQuality: '差', - detailData: 90 - }] - }, - onInit() { - if (this.airData[0].detailData > 100) { - this.src1 = '/common/cloud_red.png'; - this.textColor1 = '#ff0000'; - this.bgColor1 = '#9d7462'; - } else if (this.airData[0].detailData > 50 ) { - this.src1 = '/common/cloud_yellow.png'; - this.textColor1 = '#ecf19a'; - this.bgColor1 = '#9d9d62'; - } - if (this.airData[1].detailData > 100) { - this.src2 = '/common/cloud_red.png'; - this.textColor2 = '#ff0000'; - this.bgColor2 = '#9d9d62'; - } else if (50 < this.airData[1].detailData) { - this.src2 = '/common/cloud_yellow.png' - this.textColor2 = '#ecf19a'; - this.bgColor2 = '#9d9d62'; - } - if (this.selectedCityIndex) { - this.swiperPage = this.selectedCityIntex - if (this.swiperPage == 0) { - this.iconcheckedBR = '#ffffff'; - this.iconUncheckedColor = '#262626'; - } else { - this.iconcheckedColor = '#262626'; - this.iconUncheckedColor = '#ffffff'; - } - } - }, - openDetail() { - router.push({ - url: 'pages/second/second', - params: { - selectedCityIndex: this.swiperPage - } - }); - }, - exitApp() { - console.log('start exit'); - app.terminate(); - console.log('end exit') - }, - swiperChange(e) { - this.swiperPage = e.index; - if (e.index == 0) { - this.iconcheckedColor = '#ffffff'; - this.iconUncheckedColor = '#262626'; - } else { - this.iconcheckedColor = '#262626'; - this.iconUncheckedColor = '#ffffff'; - } + data: { + textColor1: '#00ff00', + textColor2: '#00ff00', + bgColor1: '#669966', + bgColor2: '#669966', + swiperPage: 0, + percent1: 40, + percent2: 90, + iconcheckedBR: '6px', + iconcheckedColor: '#ffffff', + iconUncheckedColor: '#262626', + src1: '/common/cloud_green.png', + src2: '/common/cloud_green.png', + airData: [{ + location: '东莞', + airQuality: '良', + detailData: 40 + }, { + location: '深圳', + airQuality: '差', + detailData: 90 + }] + }, + onInit() { + if (this.airData[0].detailData > 100) { + this.src1 = '/common/cloud_red.png'; + this.textColor1 = '#ff0000'; + this.bgColor1 = '#9d7462'; + } else if (this.airData[0].detailData > 50) { + this.src1 = '/common/cloud_yellow.png'; + this.textColor1 = '#ecf19a'; + this.bgColor1 = '#9d9d62'; } + if (this.airData[1].detailData > 100) { + this.src2 = '/common/cloud_red.png'; + this.textColor2 = '#ff0000'; + this.bgColor2 = '#9d9d62'; + } else if (50 < this.airData[1].detailData) { + this.src2 = '/common/cloud_yellow.png' + this.textColor2 = '#ecf19a'; + this.bgColor2 = '#9d9d62'; + } + if (this.selectedCityIndex) { + this.swiperPage = this.selectedCityIntex + if (this.swiperPage == 0) { + this.iconcheckedBR = '#ffffff'; + this.iconUncheckedColor = '#262626'; + } else { + this.iconcheckedColor = '#262626'; + this.iconUncheckedColor = '#ffffff'; + } + } + }, + openDetail() { + router.push({ + url: 'pages/second/second', + params: { + selectedCityIndex: this.swiperPage + } + }); + }, + exitApp() { + console.log('start exit'); + app.terminate(); + console.log('end exit') + }, + swiperChange(e) { + this.swiperPage = e.index; + if (e.index == 0) { + this.iconcheckedColor = '#ffffff'; + this.iconUncheckedColor = '#262626'; + } else { + this.iconcheckedColor = '#262626'; + this.iconUncheckedColor = '#ffffff'; + } + } } diff --git a/common/AirQuality/entry/src/main/js/default/pages/second/second.hml b/common/AirQuality/entry/src/main/js/default/pages/second/second.hml index b8bbd13c4..bbdf7a1ac 100644 --- a/common/AirQuality/entry/src/main/js/default/pages/second/second.hml +++ b/common/AirQuality/entry/src/main/js/default/pages/second/second.hml @@ -13,135 +13,135 @@ See the License for the specific language governing permissions and limitations under the License. -->
-
- - {{ $t('strings.title') }} -
- - - {{ location }} - - -
-
- CO -
-
-
-
-
-
-
-
-
-
-
- MON - TUE - WED - THU - FRI - SAT - SUN -
-
-
- SO2 -
-
-
-
-
-
-
-
-
-
-
- MON - TUE - WED - THU - FRI - SAT - SUN -
-
-
-
- -
-
- PM10 -
-
-
-
-
-
-
-
-
-
-
- MON - TUE - WED - THU - FRI - SAT - SUN -
-
-
- PM2.5 -
-
-
-
-
-
-
-
-
-
-
- MON - TUE - WED - THU - FRI - SAT - SUN -
-
-
-
- -
-
- NO2 -
-
-
-
-
-
-
-
-
-
-
- MON - TUE - WED - THU - FRI - SAT - SUN -
-
-
-
-
+
+ + {{ $t('strings.title') }} +
+ + + {{ location }} + + +
+
+ CO +
+
+
+
+
+
+
+
+
+
+
+ MON + TUE + WED + THU + FRI + SAT + SUN +
+
+
+ SO2 +
+
+
+
+
+
+
+
+
+
+
+ MON + TUE + WED + THU + FRI + SAT + SUN +
+
+
+
+ +
+
+ PM10 +
+
+
+
+
+
+
+
+
+
+
+ MON + TUE + WED + THU + FRI + SAT + SUN +
+
+
+ PM2.5 +
+
+
+
+
+
+
+
+
+
+
+ MON + TUE + WED + THU + FRI + SAT + SUN +
+
+
+
+ +
+
+ NO2 +
+
+
+
+
+
+
+
+
+
+
+ MON + TUE + WED + THU + FRI + SAT + SUN +
+
+
+
+
diff --git a/common/AirQuality/entry/src/main/js/default/pages/second/second.js b/common/AirQuality/entry/src/main/js/default/pages/second/second.js index fb9374634..abdfbe16f 100644 --- a/common/AirQuality/entry/src/main/js/default/pages/second/second.js +++ b/common/AirQuality/entry/src/main/js/default/pages/second/second.js @@ -15,17 +15,17 @@ import router from '@ohos.router' export default { - data: { - location: '' - }, - onInit() { - if (this.selectedCityIndex === 0) { - this.location = '东莞'; - } else { - this.location = '深圳'; - } - }, - backMain() { - router.back() + data: { + location: '' + }, + onInit() { + if (this.selectedCityIndex === 0) { + this.location = '东莞'; + } else { + this.location = '深圳'; } + }, + backMain() { + router.back() + } } diff --git a/common/AirQuality/package.json b/common/AirQuality/package.json index 19efc1764..c948a751b 100644 --- a/common/AirQuality/package.json +++ b/common/AirQuality/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3", - "@ohos/hypium": "1.0.0" + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6", + "@ohos/hypium": "1.0.1" } } diff --git a/common/Clock/.gitignore b/common/Clock/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/common/Clock/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/common/Clock/README_zh.md b/common/Clock/README_zh.md index 6d134cd30..89ecc7a6c 100644 --- a/common/Clock/README_zh.md +++ b/common/Clock/README_zh.md @@ -24,7 +24,7 @@ TextClock:TextClock组件通过文本将当前系统时间显示在设备上 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 3.如果安装本示例报错为error:install sign info inconsistent,则有可能本应用被设置为系统预置应用,已安装在系统中,此时需使用命令进行替换安装,并在替换安装后对设备进行重启操作,具体命令如下: diff --git a/common/Clock/entry/src/main/js/default/app.js b/common/Clock/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/common/Clock/entry/src/main/js/default/app.js +++ b/common/Clock/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/common/Clock/entry/src/main/js/default/pages/index/index.hml b/common/Clock/entry/src/main/js/default/pages/index/index.hml index 61032a70c..93effc73a 100644 --- a/common/Clock/entry/src/main/js/default/pages/index/index.hml +++ b/common/Clock/entry/src/main/js/default/pages/index/index.hml @@ -14,14 +14,14 @@ -->
- - - - - - - {{ hour }}:{{ minute }}:{{ second }} + + + + + + + {{ hour }}:{{ minute }}:{{ second }}
\ No newline at end of file diff --git a/common/Clock/entry/src/main/js/default/pages/index/index.js b/common/Clock/entry/src/main/js/default/pages/index/index.js index ac1a561be..c43671bfd 100644 --- a/common/Clock/entry/src/main/js/default/pages/index/index.js +++ b/common/Clock/entry/src/main/js/default/pages/index/index.js @@ -14,32 +14,32 @@ */ export default { - timer: undefined, - data: { - hour: 0, - minute: 0, - second: 0 - }, - onInit() { - this.updateTime(); - this.timer = setInterval(this.updateTime, 1000) - }, - updateTime: function () { - var nowTime = new Date() - this.hour = nowTime.getHours() - this.minute = nowTime.getMinutes() - this.second = nowTime.getSeconds() - if (this.hour < 10) { - this.hour = '0' + this.hour - } - if (this.minute < 10) { - this.minute = '0' + this.minute - } - if (this.second < 10) { - this.second = '0' + this.second - } - }, - onDestroy() { - clearInterval(this.timer) + timer: undefined, + data: { + hour: 0, + minute: 0, + second: 0 + }, + onInit() { + this.updateTime(); + this.timer = setInterval(this.updateTime, 1000) + }, + updateTime: function () { + var nowTime = new Date() + this.hour = nowTime.getHours() + this.minute = nowTime.getMinutes() + this.second = nowTime.getSeconds() + if (this.hour < 10) { + this.hour = '0' + this.hour } + if (this.minute < 10) { + this.minute = '0' + this.minute + } + if (this.second < 10) { + this.second = '0' + this.second + } + }, + onDestroy() { + clearInterval(this.timer) + } } \ No newline at end of file diff --git a/common/Clock/package.json b/common/Clock/package.json index 8643303d7..a2e460b82 100644 --- a/common/Clock/package.json +++ b/common/Clock/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/common/DistributeCalc/.gitignore b/common/DistributeCalc/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/common/DistributeCalc/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/common/DistributeCalc/README_zh.md b/common/DistributeCalc/README_zh.md index bdb8adb7a..39bd18075 100644 --- a/common/DistributeCalc/README_zh.md +++ b/common/DistributeCalc/README_zh.md @@ -40,7 +40,7 @@ 3.分布式计算功能使用的前提是分布式组网。 -4.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +4.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 5.本示例需要使用@ohos.distributedHardware.deviceManager系统权限的系统接口。使用Full SDK时需要手动从镜像站点获取,并在DevEco Studio中替换,具体操作可参考[替换指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md)。 diff --git a/common/DistributeCalc/entry/src/main/js/MainAbility/app.js b/common/DistributeCalc/entry/src/main/js/MainAbility/app.js index e3a0891c0..e2e723dcb 100644 --- a/common/DistributeCalc/entry/src/main/js/MainAbility/app.js +++ b/common/DistributeCalc/entry/src/main/js/MainAbility/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/common/DistributeCalc/entry/src/main/js/MainAbility/common/RemoteDeviceModel.js b/common/DistributeCalc/entry/src/main/js/MainAbility/common/RemoteDeviceModel.js index 82cd0ad31..ba3dd0193 100644 --- a/common/DistributeCalc/entry/src/main/js/MainAbility/common/RemoteDeviceModel.js +++ b/common/DistributeCalc/entry/src/main/js/MainAbility/common/RemoteDeviceModel.js @@ -19,171 +19,171 @@ import deviceManager from '@ohos.distributedHardware.deviceManager'; let SUBSCRIBE_ID = 100; export default class RemoteDeviceModel { - deviceList = []; - discoverList = []; - callback; - authCallback; - deviceManager = undefined; + deviceList = []; + discoverList = []; + callback; + authCallback; + deviceManager = undefined; - registerDeviceListCallback(callback) { - if (typeof (this.deviceManager) === 'undefined') { - console.log("Calc[RemoteDeviceModel] deviceManager.createDeviceManager begin"); - deviceManager.createDeviceManager("ohos.samples.distributedcalc", (error, value) => { - if (error) { - console.error("Calc[RemoteDeviceModel] createDeviceManager failed."); - return; - } - this.deviceManager = value; - this.registerDeviceListCallback_(callback); - console.log("Calc[RemoteDeviceModel] createDeviceManager callback returned, error=" + error + " value=" + value); - }); - console.log("Calc[RemoteDeviceModel] deviceManager.createDeviceManager end"); - } else { - this.registerDeviceListCallback_(callback); + registerDeviceListCallback(callback) { + if (typeof (this.deviceManager) === 'undefined') { + console.log("Calc[RemoteDeviceModel] deviceManager.createDeviceManager begin"); + deviceManager.createDeviceManager("ohos.samples.distributedcalc", (error, value) => { + if (error) { + console.error("Calc[RemoteDeviceModel] createDeviceManager failed."); + return; } + this.deviceManager = value; + this.registerDeviceListCallback_(callback); + console.log("Calc[RemoteDeviceModel] createDeviceManager callback returned, error=" + error + " value=" + value); + }); + console.log("Calc[RemoteDeviceModel] deviceManager.createDeviceManager end"); + } else { + this.registerDeviceListCallback_(callback); } + } - registerDeviceListCallback_(callback) { - console.info('Calc[RemoteDeviceModel] registerDeviceListCallback'); - this.callback = callback; - if (this.deviceManager === undefined) { - console.error('Calc[RemoteDeviceModel] deviceManager has not initialized'); - this.callback(); - return; - } + registerDeviceListCallback_(callback) { + console.info('Calc[RemoteDeviceModel] registerDeviceListCallback'); + this.callback = callback; + if (this.deviceManager === undefined) { + console.error('Calc[RemoteDeviceModel] deviceManager has not initialized'); + this.callback(); + return; + } - console.info('Calc[RemoteDeviceModel] getTrustedDeviceListSync begin'); - let list = this.deviceManager.getTrustedDeviceListSync(); - console.info('Calc[RemoteDeviceModel] getTrustedDeviceListSync end, deviceList=' + JSON.stringify(list)); - if (typeof (list) !== 'undefined' && typeof (list.length) !== 'undefined') { - this.deviceList = list; - } - this.callback(); - console.info('Calc[RemoteDeviceModel] callback finished'); + console.info('Calc[RemoteDeviceModel] getTrustedDeviceListSync begin'); + let list = this.deviceManager.getTrustedDeviceListSync(); + console.info('Calc[RemoteDeviceModel] getTrustedDeviceListSync end, deviceList=' + JSON.stringify(list)); + if (typeof (list) !== 'undefined' && typeof (list.length) !== 'undefined') { + this.deviceList = list; + } + this.callback(); + console.info('Calc[RemoteDeviceModel] callback finished'); - this.deviceManager.on('deviceStateChange', (data) => { - console.info('Calc[RemoteDeviceModel] deviceStateChange data=' + JSON.stringify(data)); - switch (data.action) { - case 0: - this.deviceList[this.deviceList.length] = data.device; - console.info('Calc[RemoteDeviceModel] online, updated device list=' + JSON.stringify(this.deviceList)); - this.callback(); - if (this.authCallback != null) { - this.authCallback(); - this.authCallback = null; - } - break; - case 2: - if (this.deviceList.length > 0) { - for (let i = 0; i < this.deviceList.length; i++) { - if (this.deviceList[i].deviceId === data.device.deviceId) { - this.deviceList[i] = data.device; - break; - } - } - } - console.info('Calc[RemoteDeviceModel] change, updated device list=' + JSON.stringify(this.deviceList)); - this.callback(); + this.deviceManager.on('deviceStateChange', (data) => { + console.info('Calc[RemoteDeviceModel] deviceStateChange data=' + JSON.stringify(data)); + switch (data.action) { + case 0: + this.deviceList[this.deviceList.length] = data.device; + console.info('Calc[RemoteDeviceModel] online, updated device list=' + JSON.stringify(this.deviceList)); + this.callback(); + if (this.authCallback != null) { + this.authCallback(); + this.authCallback = null; + } + break; + case 2: + if (this.deviceList.length > 0) { + for (let i = 0; i < this.deviceList.length; i++) { + if (this.deviceList[i].deviceId === data.device.deviceId) { + this.deviceList[i] = data.device; break; - case 1: - if (this.deviceList.length > 0) { - let list = []; - for (let j = 0; j < this.deviceList.length; j++) { - if (this.deviceList[j].deviceId != data.device.deviceId) { - list[j] = data.device; - } - } - this.deviceList = list; - } - console.info('Calc[RemoteDeviceModel] offline, updated device list=' + JSON.stringify(data.device)); - this.callback(); - break; - default: - break; + } } - }); - this.deviceManager.on('deviceFound', (data) => { - console.info('Calc[RemoteDeviceModel] deviceFound data=' + JSON.stringify(data)); - console.info('Calc[RemoteDeviceModel] deviceFound this.discoverList=' + this.discoverList); - for (let i = 0;i < this.discoverList.length; i++) { - if (this.discoverList[i].deviceId === data.device.deviceId) { - console.info('Calc[RemoteDeviceModel] device founded ignored'); - return; - } + } + console.info('Calc[RemoteDeviceModel] change, updated device list=' + JSON.stringify(this.deviceList)); + this.callback(); + break; + case 1: + if (this.deviceList.length > 0) { + let list = []; + for (let j = 0; j < this.deviceList.length; j++) { + if (this.deviceList[j].deviceId != data.device.deviceId) { + list[j] = data.device; + } } - this.discoverList[this.discoverList.length] = data.device; - console.info('Calc[RemoteDeviceModel] deviceFound this.discoverList=' + this.discoverList); - this.callback(); - }); - this.deviceManager.on('discoverFail', (data) => { - prompt.showToast({ - message: 'discoverFail reason=' + data.reason, - duration: 3000, - }); - console.info('Calc[RemoteDeviceModel] discoverFail data=' + JSON.stringify(data)); - }); - this.deviceManager.on('serviceDie', () => { - prompt.showToast({ - message: 'serviceDie', - duration: 3000, - }); - console.error('Calc[RemoteDeviceModel] serviceDie'); - }); + this.deviceList = list; + } + console.info('Calc[RemoteDeviceModel] offline, updated device list=' + JSON.stringify(data.device)); + this.callback(); + break; + default: + break; + } + }); + this.deviceManager.on('deviceFound', (data) => { + console.info('Calc[RemoteDeviceModel] deviceFound data=' + JSON.stringify(data)); + console.info('Calc[RemoteDeviceModel] deviceFound this.discoverList=' + this.discoverList); + for (let i = 0;i < this.discoverList.length; i++) { + if (this.discoverList[i].deviceId === data.device.deviceId) { + console.info('Calc[RemoteDeviceModel] device founded ignored'); + return; + } + } + this.discoverList[this.discoverList.length] = data.device; + console.info('Calc[RemoteDeviceModel] deviceFound this.discoverList=' + this.discoverList); + this.callback(); + }); + this.deviceManager.on('discoverFail', (data) => { + prompt.showToast({ + message: 'discoverFail reason=' + data.reason, + duration: 3000, + }); + console.info('Calc[RemoteDeviceModel] discoverFail data=' + JSON.stringify(data)); + }); + this.deviceManager.on('serviceDie', () => { + prompt.showToast({ + message: 'serviceDie', + duration: 3000, + }); + console.error('Calc[RemoteDeviceModel] serviceDie'); + }); - SUBSCRIBE_ID = Math.floor(65536 * Math.random()); - let info = { - subscribeId: SUBSCRIBE_ID, - mode: 0xAA, - medium: 2, - freq: 2, - isSameAccount: false, - isWakeRemote: true, - capability: 0 - }; - console.info('Calc[RemoteDeviceModel] startDeviceDiscovery ' + SUBSCRIBE_ID); - this.deviceManager.startDeviceDiscovery(info); + SUBSCRIBE_ID = Math.floor(65536 * Math.random()); + let info = { + subscribeId: SUBSCRIBE_ID, + mode: 0xAA, + medium: 2, + freq: 2, + isSameAccount: false, + isWakeRemote: true, + capability: 0 + }; + console.info('Calc[RemoteDeviceModel] startDeviceDiscovery ' + SUBSCRIBE_ID); + this.deviceManager.startDeviceDiscovery(info); + } + + unregisterDeviceListCallback() { + console.info('Calc[RemoteDeviceModel] stopDeviceDiscovery ' + SUBSCRIBE_ID); + if (this.deviceManager === undefined) { + return } + this.deviceManager.stopDeviceDiscovery(SUBSCRIBE_ID); + this.deviceManager.off('deviceStateChange'); + this.deviceManager.off('deviceFound'); + this.deviceManager.off('discoverFail'); + this.deviceManager.off('serviceDie'); + this.deviceList = []; + } - unregisterDeviceListCallback() { - console.info('Calc[RemoteDeviceModel] stopDeviceDiscovery ' + SUBSCRIBE_ID); + authenticateDevice(device, callBack) { + console.info('Calc[RemoteDeviceModel] authenticateDevice ' + JSON.stringify(device)); + for (let i = 0; i < this.discoverList.length; i++) { + if (this.discoverList[i].deviceId === device.deviceId) { + let extraInfo = { + 'targetPkgName': 'ohos.samples.distributedcalc', + 'appName': 'Distributed Calc', + 'appDescription': 'Distributed Calc', + 'business': '0' + }; + let authParam = { + 'authType': 1, + 'extraInfo': extraInfo + }; if (this.deviceManager === undefined) { return } - this.deviceManager.stopDeviceDiscovery(SUBSCRIBE_ID); - this.deviceManager.off('deviceStateChange'); - this.deviceManager.off('deviceFound'); - this.deviceManager.off('discoverFail'); - this.deviceManager.off('serviceDie'); - this.deviceList = []; - } - - authenticateDevice(device, callBack) { - console.info('Calc[RemoteDeviceModel] authenticateDevice ' + JSON.stringify(device)); - for (let i = 0; i < this.discoverList.length; i++) { - if (this.discoverList[i].deviceId === device.deviceId) { - let extraInfo = { - 'targetPkgName': 'ohos.samples.distributedcalc', - 'appName': 'Distributed Calc', - 'appDescription': 'Distributed Calc', - 'business': '0' - }; - let authParam = { - 'authType': 1, - 'extraInfo': extraInfo - }; - if (this.deviceManager === undefined) { - return - } - this.deviceManager.authenticateDevice(device, authParam, (err, data) => { - if (err) { - console.info('Calc[RemoteDeviceModel] authenticateDevice error:' + JSON.stringify(err)); - this.authCallback = null; - return; - } - console.info('Calc[RemoteDeviceModel] authenticateDevice succeed:' + JSON.stringify(data)); - this.authCallback = callBack; - }) - } - } + this.deviceManager.authenticateDevice(device, authParam, (err, data) => { + if (err) { + console.info('Calc[RemoteDeviceModel] authenticateDevice error:' + JSON.stringify(err)); + this.authCallback = null; + return; + } + console.info('Calc[RemoteDeviceModel] authenticateDevice succeed:' + JSON.stringify(data)); + this.authCallback = callBack; + }) + } } + } } \ No newline at end of file diff --git a/common/DistributeCalc/entry/src/main/js/MainAbility/common/calculator.js b/common/DistributeCalc/entry/src/main/js/MainAbility/common/calculator.js index ffbb349cf..ffefbd388 100644 --- a/common/DistributeCalc/entry/src/main/js/MainAbility/common/calculator.js +++ b/common/DistributeCalc/entry/src/main/js/MainAbility/common/calculator.js @@ -14,162 +14,162 @@ */ const OperatorLevels = { - '+': 0, - '-': 0, - '*': 1, - '/': 1, + '+': 0, + '-': 0, + '*': 1, + '/': 1, }; const OperatorHandlers = { - '+': (one, other) => (parseFloat(one) + parseFloat(other)).toFixed(getFloatNum(one, other, '+')), - '-': (one, other) => (one - other).toFixed(getFloatNum(one, other, '-')), - '*': (one, other) => (one * other).toFixed(getFloatNum(one, other, '*')), - '/': (one, other) => (one / other).toFixed(getFloatNum(one, other, '/')), + '+': (one, other) => (parseFloat(one) + parseFloat(other)).toFixed(getFloatNum(one, other, '+')), + '-': (one, other) => (one - other).toFixed(getFloatNum(one, other, '-')), + '*': (one, other) => (one * other).toFixed(getFloatNum(one, other, '*')), + '/': (one, other) => (one / other).toFixed(getFloatNum(one, other, '/')), }; function getFloatNum(one, other, oprate) { - let num = 0; - let s1 = (new String(one)).toString(); - let s2 = (new String(other)).toString(); - let num1 = 0; - if (s1.indexOf('.') !== -1) { - num1 = s1.split('.')[1].length; - } - let num2 = 0; - if (s2.indexOf('.') !== -1) { - num2 = s2.split('.')[1].length; - } - if (oprate === '+' || oprate === '-') { - num = Math.max(num1, num2); - } - if (oprate === '*') { - num = num1 + num2; - } - if (oprate === '/') { - num = (num1 + s2.length) > 3 ? (num1 + s2.length) : 3; - } - return num; + let num = 0; + let s1 = (new String(one)).toString(); + let s2 = (new String(other)).toString(); + let num1 = 0; + if (s1.indexOf('.') !== -1) { + num1 = s1.split('.')[1].length; + } + let num2 = 0; + if (s2.indexOf('.') !== -1) { + num2 = s2.split('.')[1].length; + } + if (oprate === '+' || oprate === '-') { + num = Math.max(num1, num2); + } + if (oprate === '*') { + num = num1 + num2; + } + if (oprate === '/') { + num = (num1 + s2.length) > 3 ? (num1 + s2.length) : 3; + } + return num; } function calcSuffixExpression(expression) { - const numberStack = []; + const numberStack = []; - while (expression.length) { - let element = expression.shift(); - if (!isOperator(element)) { - numberStack.push(element); - } else { - const one = numberStack.pop(); - const other = numberStack.pop(); - const result = OperatorHandlers[element](other, one); - if (result.length > 15) { - numberStack.push(parseFloat(result).toExponential()); - } else { - numberStack.push(result); - } - } + while (expression.length) { + let element = expression.shift(); + if (!isOperator(element)) { + numberStack.push(element); + } else { + const one = numberStack.pop(); + const other = numberStack.pop(); + const result = OperatorHandlers[element](other, one); + if (result.length > 15) { + numberStack.push(parseFloat(result).toExponential()); + } else { + numberStack.push(result); + } } - return numberStack[0]; + } + return numberStack[0]; } function toSuffixExpression(expression) { - const operatorStack = []; - const suffixExpression = []; - let topOperator; - for (let idx = 0, size = expression.length; idx < size; idx++) { - const element = expression[idx]; - if (element === '(') { - operatorStack.push(element); - continue; - } - if (element === ')') { - if (operatorStack.length) { - let operator = operatorStack.pop(); - while (operator !== '(') { - suffixExpression.push(operator); - operator = operatorStack.pop(); - } - } - continue; - } - if (isOperator(element)) { - if (!operatorStack.length) { - operatorStack.push(element); - } else { - topOperator = operatorStack[operatorStack.length - 1]; - if (!isGrouping(topOperator) && !isPrioritized(element, topOperator)) { - suffixExpression.push(operatorStack.pop()); - } - operatorStack.push(element); - } - continue; + const operatorStack = []; + const suffixExpression = []; + let topOperator; + for (let idx = 0, size = expression.length; idx < size; idx++) { + const element = expression[idx]; + if (element === '(') { + operatorStack.push(element); + continue; + } + if (element === ')') { + if (operatorStack.length) { + let operator = operatorStack.pop(); + while (operator !== '(') { + suffixExpression.push(operator); + operator = operatorStack.pop(); } - suffixExpression.push(element); + } + continue; } - while (operatorStack.length) { - suffixExpression.push(operatorStack.pop()); + if (isOperator(element)) { + if (!operatorStack.length) { + operatorStack.push(element); + } else { + topOperator = operatorStack[operatorStack.length - 1]; + if (!isGrouping(topOperator) && !isPrioritized(element, topOperator)) { + suffixExpression.push(operatorStack.pop()); + } + operatorStack.push(element); + } + continue; } - return suffixExpression; + suffixExpression.push(element); + } + while (operatorStack.length) { + suffixExpression.push(operatorStack.pop()); + } + return suffixExpression; } function parseInfixExpression(content) { - const size = content.length; - const lastIdx = size - 1; - let number = ''; - const expression = []; - for (let idx = 0; idx < size; idx++) { - const element = content[idx]; - if (isGrouping(element)) { - if (number !== '') { - expression.push(number); - number = ''; - } - expression.push(element); - } else if (isOperator(element)) { - if (isSymbol(element) && (idx === 0 || content[idx - 1] === '(')) { - number += element; - } else { - if (number !== '') { - expression.push(number); - number = ''; - } - - if (idx !== lastIdx) { - expression.push(element); - } - } - } else { - number += element; + const size = content.length; + const lastIdx = size - 1; + let number = ''; + const expression = []; + for (let idx = 0; idx < size; idx++) { + const element = content[idx]; + if (isGrouping(element)) { + if (number !== '') { + expression.push(number); + number = ''; + } + expression.push(element); + } else if (isOperator(element)) { + if (isSymbol(element) && (idx === 0 || content[idx - 1] === '(')) { + number += element; + } else { + if (number !== '') { + expression.push(number); + number = ''; } - if (idx === lastIdx && number !== '') { - expression.push(number); + if (idx !== lastIdx) { + expression.push(element); } + } + } else { + number += element; + } + + if (idx === lastIdx && number !== '') { + expression.push(number); } - return expression; + } + return expression; } function isPrioritized(one, other) { - return OperatorLevels[one] > OperatorLevels[other]; + return OperatorLevels[one] > OperatorLevels[other]; } export function isOperator(operator) { - return ( - operator === '+' || operator === '-' || operator === '*' || operator === '/' - ); + return ( + operator === '+' || operator === '-' || operator === '*' || operator === '/' + ); } function isSymbol(symbol) { - return symbol === '+' || symbol === '-'; + return symbol === '+' || symbol === '-'; } function isGrouping(operator) { - return operator === '(' || operator === ')'; + return operator === '(' || operator === ')'; } export function calc(content) { - const infixExpression = parseInfixExpression(content); - const suffixExpression = toSuffixExpression(infixExpression); - return calcSuffixExpression(suffixExpression); + const infixExpression = parseInfixExpression(content); + const suffixExpression = toSuffixExpression(infixExpression); + return calcSuffixExpression(suffixExpression); } diff --git a/common/DistributeCalc/entry/src/main/js/MainAbility/common/kvstoreModel.js b/common/DistributeCalc/entry/src/main/js/MainAbility/common/kvstoreModel.js index 5d148a4e9..ca7e2c9ee 100644 --- a/common/DistributeCalc/entry/src/main/js/MainAbility/common/kvstoreModel.js +++ b/common/DistributeCalc/entry/src/main/js/MainAbility/common/kvstoreModel.js @@ -17,84 +17,83 @@ import distributedData from '@ohos.data.distributedData'; const STORE_ID = 'distributedcalc'; export class KvStoreModel { - kvManager; - kvStore; + kvManager; + kvStore; - constructor() { - } + constructor() { + } - createKvStore(callback) { - if ((typeof (this.kvStore) !== 'undefined')) { - callback(); - return; - } - var config = { - bundleName: 'ohos.samples.distributedcalc', - userInfo: { - userId: '0', - userType: 0 - } - }; - console.info('[KvStoreModel] createKVManager begin'); - distributedData.createKVManager(config).then((manager) => { - console.info('[KvStoreModel] createKVManager success, kvManager=' + JSON.stringify(manager)); - this.kvManager = manager; - let options = { - createIfMissing: true, - encrypt: false, - backup: false, - autoSync: true, - kvStoreType: 1, - securityLevel: 1, - }; - console.info('[KvStoreModel] kvManager.getKVStore begin'); - this.kvManager.getKVStore(STORE_ID, options).then((store) => { - console.info('[KvStoreModel] getKVStore success, kvStore=' + store); - this.kvStore = store; - callback(); - }); - console.info('[KvStoreModel] kvManager.getKVStore end'); - }); - console.info('[KvStoreModel] createKVManager end'); + createKvStore(callback) { + if ((typeof (this.kvStore) !== 'undefined')) { + callback(); + return; } + var config = { + bundleName: 'ohos.samples.distributedcalc', + userInfo: { + userId: '0', + userType: 0 + } + }; + console.info('[KvStoreModel] createKVManager begin'); + distributedData.createKVManager(config).then((manager) => { + console.info('[KvStoreModel] createKVManager success, kvManager=' + JSON.stringify(manager)); + this.kvManager = manager; + let options = { + createIfMissing: true, + encrypt: false, + backup: false, + autoSync: true, + kvStoreType: 1, + securityLevel: 1, + }; + console.info('[KvStoreModel] kvManager.getKVStore begin'); + this.kvManager.getKVStore(STORE_ID, options).then((store) => { + console.info('[KvStoreModel] getKVStore success, kvStore=' + store); + this.kvStore = store; + callback(); + }); + console.info('[KvStoreModel] kvManager.getKVStore end'); + }); + console.info('[KvStoreModel] createKVManager end'); + } - put(key, value) { - console.info('[KvStoreModel] kvStore.put ' + key + '=' + value); - this.kvStore.put(key, value + 'end').then((data) => { - console.info('[KvStoreModel] kvStore.put ' + key + ' finished, data=' + JSON.stringify(data)); - }).catch((err) => { - console.error('[KvStoreModel] kvStore.put ' + key + ' failed, ' + JSON.stringify(err)); - }); - } + put(key, value) { + console.info('[KvStoreModel] kvStore.put ' + key + '=' + value); + this.kvStore.put(key, value + 'end').then((data) => { + console.info('[KvStoreModel] kvStore.put ' + key + ' finished, data=' + JSON.stringify(data)); + }).catch((err) => { + console.error('[KvStoreModel] kvStore.put ' + key + ' failed, ' + JSON.stringify(err)); + }); + } - off() { - if (this.kvStore !== null) { - this.kvStore.off('dataChange'); - }) - } + off() { + if (this.kvStore !== null) { + this.kvStore.off('dataChange') } + } - setOnMessageReceivedListener(msg, refreshdata) { - console.info('[KvStoreModel] setOnMessageReceivedListener ' + msg); - this.createKvStore(() => { - console.info('[KvStoreModel] kvStore.on(dataChange) begin'); - this.kvStore.on('dataChange', 1, (data) => { - console.info('[KvStoreModel] dataChange, ' + JSON.stringify(data)); - console.info('[KvStoreModel] dataChange, insert ' + data.insertEntries.length + ' udpate ' - + data.updateEntries.length); - let entries = data.insertEntries.length > 0 ? data.insertEntries : data.updateEntries; - for (let i = 0; i < entries.length; i++) { - if (entries[i].key === msg) { - let value = entries[i].value.value; - console.info('[KvStoreModel] Entries receive ' + msg + '=' + value); - let valueResult = value.substring(0, value.lastIndexOf('end')); - console.info('[KvStoreModel] Entries receive valueResult = ' + valueResult); - refreshdata(valueResult); - return; - } - } - }); - console.info('[KvStoreModel] kvStore.on(dataChange) end'); - }); - } + setOnMessageReceivedListener(msg, refreshdata) { + console.info('[KvStoreModel] setOnMessageReceivedListener ' + msg); + this.createKvStore(() => { + console.info('[KvStoreModel] kvStore.on(dataChange) begin'); + this.kvStore.on('dataChange', 1, (data) => { + console.info('[KvStoreModel] dataChange, ' + JSON.stringify(data)); + console.info('[KvStoreModel] dataChange, insert ' + data.insertEntries.length + ' udpate ' + + data.updateEntries.length); + let entries = data.insertEntries.length > 0 ? data.insertEntries : data.updateEntries; + for (let i = 0; i < entries.length; i++) { + if (entries[i].key === msg) { + let value = entries[i].value.value; + console.info('[KvStoreModel] Entries receive ' + msg + '=' + value); + let valueResult = value.substring(0, value.lastIndexOf('end')); + console.info('[KvStoreModel] Entries receive valueResult = ' + valueResult); + refreshdata(valueResult); + return; + } + } + }); + console.info('[KvStoreModel] kvStore.on(dataChange) end'); + }); + } } \ No newline at end of file diff --git a/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.hml b/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.hml index c52260a68..8c38ccb7c 100644 --- a/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.hml @@ -14,100 +14,100 @@ limitations under the License. -->
-
- -
- - - {{ title }} - -
- -
- - {{ expression }} +
+ +
+ + + {{ title }} - - {{ result }} - -
-
- -
- 7 -
-
- 8 -
-
- 9 -
-
- -
-
- -
-
- 4 -
-
- 5 -
-
- 6 -
-
- -
-
- -
-
- 1 -
-
- 2 -
-
- 3 -
-
- -
-
- -
-
- 0 -
-
- . -
-
- -
-
-
- -
- 选择设备 - - -
- {{ $item.deviceName - }} - - -
-
-
- 取消 +
+ +
+ + {{ expression }} + + + {{ result }} + +
+
+ +
+ 7 +
+
+ 8 +
+
+ 9 +
+
+ +
+
+ +
+
+ 4 +
+
+ 5 +
+
+ 6 +
+
+ +
+
+ +
+
+ 1 +
+
+ 2 +
+
+ 3 +
+
+ +
+
+ +
+
+ 0 +
+
+ . +
+
+ +
+
+
+ +
+ 选择设备 + + +
+ {{ $item.deviceName + }} -
-
+ +
+ + + 取消 + +
+
\ No newline at end of file diff --git a/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.js b/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.js index fa812e293..0aefb21e0 100644 --- a/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.js +++ b/common/DistributeCalc/entry/src/main/js/MainAbility/pages/index/index.js @@ -25,263 +25,263 @@ let remoteDeviceModel = new RemoteDeviceModel() let timerId = 0 export default { - data: { - title: '计算器', - expression: '', - result: '', - selectedIndex: 0, - isFA: false, - isPush: false, - isDistributed: false, - deviceList: [] - }, - onInit() { - this.grantPermission() - this.$watch('expression', (value) => { - if (value !== '') { - console.info('Calc[IndexPage] value ' + value); - this.result = calc(value); - console.info('Calc[IndexPage] result = ' + this.result); - console.log('Calc[IndexPage] put key start'); - this.dataChange('expression', value); - } - }); - this.initKVManager(); - }, - onShow() { - featureAbility.getWant((error, want) => { - console.info('Calc[IndexPage] featureAbility.getWant =' + JSON.stringify(want.parameters)); - if (want.parameters.isFA === 'FA') { - this.isFA = true; - this.isDistributed = true; - } - }); - }, - grantPermission() { - console.info('Calc[IndexPage] grantPermission') - let context = featureAbility.getContext() - context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'], 666, function (result) { - console.info(`Calc[IndexPage] grantPermission,requestPermissionsFromUser,result.requestCode=${result}`) - }) - }, - dataChange(key, value) { - console.log('Calc[IndexPage] dataChange isDistributed = ' + this.isDistributed); - if (this.isDistributed && kvStoreModel != null) { - kvStoreModel.put(key, value); - } - }, - initKVManager() { - kvStoreModel.setOnMessageReceivedListener('expression', (value) => { - console.log('Calc[IndexPage] data changed:' + value); - if (value === 'exit') { - console.info('Calc[CalcPage] app exit!'); - app.terminate(); - return; - } - if (value === 'clear') { - console.log('Calc[IndexPage] data expression:clear'); - this.expression = ''; - this.result = ''; - return; - } - if (value === 'equal') { - if (this.result !== '') { - console.log('Calc[IndexPage] data expression:equal'); - this.expression = this.result; - this.result = ''; - pressedEqual = true; - } - return; - } - this.expression = value; - pressedEqual = false; - console.log('Calc[IndexPage] data expression:' + this.expression); - }); - timerId = setInterval(() => { - if (this.isDistributed) { - let temp = this.expression; - this.expression = temp; - } - }, 200); - }, - stopDataListener() { - console.log('Calc[IndexPage] stopDataListener'); - if(kvStoreModel === null || kvStoreModel === undefined) { - return - } - kvStoreModel.off() - }, - onHide() { - if (remoteDeviceModel === undefined) { - return - } - remoteDeviceModel.unregisterDeviceListCallback(); - if (this.isDistributed && kvStoreModel != null) { - this.stopDataListener(); - this.isDistributed = false; - } - clearInterval(timerId) - kvStoreModel = null - remoteDeviceModel = undefined - }, - showDialog() { - console.info('Calc[IndexPage] showDialog start'); - this.deviceList = []; - if (remoteDeviceModel === undefined) { - remoteDeviceModel = new RemoteDeviceModel() - } - remoteDeviceModel.registerDeviceListCallback(() => { - console.info('Calc[IndexPage] registerDeviceListCallback on remote device updated, count=' - + remoteDeviceModel.deviceList.length); - let list = []; - list.push({ - deviceId: '0', - deviceName: 'Local device', - deviceType: 0, - networkId: '', - checked: this.selectedIndex === 0 - }); - let tempList = remoteDeviceModel.discoverList.length > 0 ? remoteDeviceModel.discoverList : remoteDeviceModel.deviceList; - for (let i = 0; i < tempList.length; i++) { - console.info('Calc[IndexPage] device ' + i + '/' + tempList.length - + ' deviceId=' + tempList[i].deviceId + ' deviceName=' + tempList[i].deviceName - + ' deviceType=' + tempList[i].deviceType); - list.push({ - deviceId: tempList[i].deviceId, - deviceName: tempList[i].deviceName, - deviceType: tempList[i].deviceType, - networkId: tempList[i].networkId, - checked: this.selectedIndex === (i + 1) - }); - } - this.deviceList = list; - this.$element('showDialog').close(); - this.$element('showDialog').show(); - }); - }, - cancelDialog() { - this.$element('showDialog').close(); - if(remoteDeviceModel === undefined) { - return; - } - remoteDeviceModel.unregisterDeviceListCallback(); - }, - - selectDevice(item) { - let index = this.deviceList.indexOf(item); - console.log('Calc[IndexPage] select index:' + index); - console.log('Calc[IndexPage] select selectedIndex:' + this.selectedIndex); - if (index === this.selectedIndex) { - console.log('Calc[IndexPage] index === this.selectedIndex'); - return; - } - this.selectedIndex = index; - if (index === 0) { - console.log('Calc[IndexPage] stop ability'); - this.dataChange('expression', 'exit'); - this.isDistributed = false; - this.stopDataListener(); - this.clearSelectState(); - return; - } - console.log('Calc[IndexPage] start ability ......'); + data: { + title: '计算器', + expression: '', + result: '', + selectedIndex: 0, + isFA: false, + isPush: false, + isDistributed: false, + deviceList: [] + }, + onInit() { + this.grantPermission() + this.$watch('expression', (value) => { + if (value !== '') { + console.info('Calc[IndexPage] value ' + value); + this.result = calc(value); + console.info('Calc[IndexPage] result = ' + this.result); + console.log('Calc[IndexPage] put key start'); + this.dataChange('expression', value); + } + }); + this.initKVManager(); + }, + onShow() { + featureAbility.getWant((error, want) => { + console.info('Calc[IndexPage] featureAbility.getWant =' + JSON.stringify(want.parameters)); + if (want.parameters.isFA === 'FA') { + this.isFA = true; this.isDistributed = true; - if (remoteDeviceModel === undefined || remoteDeviceModel.discoverList.length <= 0) { - console.log('Calc[IndexPage] continue device:' + JSON.stringify(this.deviceList)); - this.startAbility(this.deviceList[index].deviceId); - this.clearSelectState(); - return; - } - console.log('Calc[IndexPage] start ability1, needAuth'); - remoteDeviceModel.authenticateDevice(this.deviceList[index], () => { - console.log('Calc[IndexPage] auth and online finished'); - this.startAbility(this.deviceList[index].deviceId); - }); - this.clearSelectState(); - console.log('Calc[IndexPage] start ability end....'); - }, - clearSelectState() { - this.deviceList = []; - this.$element('showDialog').close(); - }, - async startAbility(deviceId) { - console.log('Calc[IndexPage] startAbility deviceId:' + deviceId); - await featureAbility.startAbility({ - want: { - bundleName: 'ohos.samples.distributedcalc', - abilityName: 'ohos.samples.distributedcalc.MainAbility', - deviceId: deviceId, - parameters: { - isFA: 'FA' - } - } - }) - console.log('Calc[IndexPage] start ability finished'); - this.dataChange('expression', this.expression); - console.log('Calc[IndexPage] startAbility end'); - }, - handleClear() { + } + }); + }, + grantPermission() { + console.info('Calc[IndexPage] grantPermission') + let context = featureAbility.getContext() + context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'], 666, function (result) { + console.info(`Calc[IndexPage] grantPermission,requestPermissionsFromUser,result.requestCode=${result}`) + }) + }, + dataChange(key, value) { + console.log('Calc[IndexPage] dataChange isDistributed = ' + this.isDistributed); + if (this.isDistributed && kvStoreModel != null) { + kvStoreModel.put(key, value); + } + }, + initKVManager() { + kvStoreModel.setOnMessageReceivedListener('expression', (value) => { + console.log('Calc[IndexPage] data changed:' + value); + if (value === 'exit') { + console.info('Calc[CalcPage] app exit!'); + app.terminate(); + return; + } + if (value === 'clear') { + console.log('Calc[IndexPage] data expression:clear'); this.expression = ''; this.result = ''; - console.log('Calc[IndexPage] handleClear'); - this.dataChange('expression', 'clear'); - }, - handleInput(value) { - console.log('Calc[IndexPage] handle input value:' + value); - this.isPush = false; - if (isOperator(value)) { - if (pressedEqual) { - pressedEqual = false; - } else { - const size = this.expression.length; - if (size) { - const last = this.expression.charAt(size - 1); - if (isOperator(last)) { - this.expression = this.expression.substring(0, this.expression.length - 1); - } - } - } - if (!this.expression && (value === '*' || value === '/')) { - return; - } - this.expression += value; - } else { - if (pressedEqual) { - pressedEqual = false; - } - this.expression += value; + return; + } + if (value === 'equal') { + if (this.result !== '') { + console.log('Calc[IndexPage] data expression:equal'); + this.expression = this.result; + this.result = ''; + pressedEqual = true; } + return; + } + this.expression = value; + pressedEqual = false; + console.log('Calc[IndexPage] data expression:' + this.expression); + }); + timerId = setInterval(() => { + if (this.isDistributed) { + let temp = this.expression; + this.expression = temp; + } + }, 200); + }, + stopDataListener() { + console.log('Calc[IndexPage] stopDataListener'); + if (kvStoreModel === null || kvStoreModel === undefined) { + return + } + kvStoreModel.off() + }, + onHide() { + if (remoteDeviceModel === undefined) { + return + } + remoteDeviceModel.unregisterDeviceListCallback(); + if (this.isDistributed && kvStoreModel != null) { + this.stopDataListener(); + this.isDistributed = false; + } + clearInterval(timerId) + kvStoreModel = null + remoteDeviceModel = undefined + }, + showDialog() { + console.info('Calc[IndexPage] showDialog start'); + this.deviceList = []; + if (remoteDeviceModel === undefined) { + remoteDeviceModel = new RemoteDeviceModel() + } + remoteDeviceModel.registerDeviceListCallback(() => { + console.info('Calc[IndexPage] registerDeviceListCallback on remote device updated, count=' + + remoteDeviceModel.deviceList.length); + let list = []; + list.push({ + deviceId: '0', + deviceName: 'Local device', + deviceType: 0, + networkId: '', + checked: this.selectedIndex === 0 + }); + let tempList = remoteDeviceModel.discoverList.length > 0 ? remoteDeviceModel.discoverList : remoteDeviceModel.deviceList; + for (let i = 0; i < tempList.length; i++) { + console.info('Calc[IndexPage] device ' + i + '/' + tempList.length + + ' deviceId=' + tempList[i].deviceId + ' deviceName=' + tempList[i].deviceName + + ' deviceType=' + tempList[i].deviceType); + list.push({ + deviceId: tempList[i].deviceId, + deviceName: tempList[i].deviceName, + deviceType: tempList[i].deviceType, + networkId: tempList[i].networkId, + checked: this.selectedIndex === (i + 1) + }); + } + this.deviceList = list; + this.$element('showDialog').close(); + this.$element('showDialog').show(); + }); + }, + cancelDialog() { + this.$element('showDialog').close(); + if (remoteDeviceModel === undefined) { + return; + } + remoteDeviceModel.unregisterDeviceListCallback(); + }, - }, - handleBackspace() { - if (pressedEqual) { - this.expression = ''; - this.result = ''; - pressedEqual = false; - console.log('Calc[IndexPage] handleBackspace1'); - this.dataChange('expression', 'clear'); - } else { - this.isPush = false; - this.expression = this.expression.substring(0, this.expression.length - 1); - if (!this.expression.length) { - this.result = ''; - console.log('Calc[IndexPage] handleBackspace2'); - this.dataChange('expression', 'clear'); - } + selectDevice(item) { + let index = this.deviceList.indexOf(item); + console.log('Calc[IndexPage] select index:' + index); + console.log('Calc[IndexPage] select selectedIndex:' + this.selectedIndex); + if (index === this.selectedIndex) { + console.log('Calc[IndexPage] index === this.selectedIndex'); + return; + } + this.selectedIndex = index; + if (index === 0) { + console.log('Calc[IndexPage] stop ability'); + this.dataChange('expression', 'exit'); + this.isDistributed = false; + this.stopDataListener(); + this.clearSelectState(); + return; + } + console.log('Calc[IndexPage] start ability ......'); + this.isDistributed = true; + if (remoteDeviceModel === undefined || remoteDeviceModel.discoverList.length <= 0) { + console.log('Calc[IndexPage] continue device:' + JSON.stringify(this.deviceList)); + this.startAbility(this.deviceList[index].deviceId); + this.clearSelectState(); + return; + } + console.log('Calc[IndexPage] start ability1, needAuth'); + remoteDeviceModel.authenticateDevice(this.deviceList[index], () => { + console.log('Calc[IndexPage] auth and online finished'); + this.startAbility(this.deviceList[index].deviceId); + }); + this.clearSelectState(); + console.log('Calc[IndexPage] start ability end....'); + }, + clearSelectState() { + this.deviceList = []; + this.$element('showDialog').close(); + }, + async startAbility(deviceId) { + console.log('Calc[IndexPage] startAbility deviceId:' + deviceId); + await featureAbility.startAbility({ + want: { + bundleName: 'ohos.samples.distributedcalc', + abilityName: 'ohos.samples.distributedcalc.MainAbility', + deviceId: deviceId, + parameters: { + isFA: 'FA' } - }, - handleEqual() { - if (this.result !== '') { - this.isPush = true; - this.expression = this.result; - this.result = ''; - pressedEqual = true; - console.log('Calc[IndexPage] handleEqual'); - this.dataChange('expression', 'equal'); + } + }) + console.log('Calc[IndexPage] start ability finished'); + this.dataChange('expression', this.expression); + console.log('Calc[IndexPage] startAbility end'); + }, + handleClear() { + this.expression = ''; + this.result = ''; + console.log('Calc[IndexPage] handleClear'); + this.dataChange('expression', 'clear'); + }, + handleInput(value) { + console.log('Calc[IndexPage] handle input value:' + value); + this.isPush = false; + if (isOperator(value)) { + if (pressedEqual) { + pressedEqual = false; + } else { + const size = this.expression.length; + if (size) { + const last = this.expression.charAt(size - 1); + if (isOperator(last)) { + this.expression = this.expression.substring(0, this.expression.length - 1); + } } - }, - handleExist() { - console.log('Calc[IndexPage] handleExist'); - app.terminate(); + } + if (!this.expression && (value === '*' || value === '/')) { + return; + } + this.expression += value; + } else { + if (pressedEqual) { + pressedEqual = false; + } + this.expression += value; + } + + }, + handleBackspace() { + if (pressedEqual) { + this.expression = ''; + this.result = ''; + pressedEqual = false; + console.log('Calc[IndexPage] handleBackspace1'); + this.dataChange('expression', 'clear'); + } else { + this.isPush = false; + this.expression = this.expression.substring(0, this.expression.length - 1); + if (!this.expression.length) { + this.result = ''; + console.log('Calc[IndexPage] handleBackspace2'); + this.dataChange('expression', 'clear'); + } + } + }, + handleEqual() { + if (this.result !== '') { + this.isPush = true; + this.expression = this.result; + this.result = ''; + pressedEqual = true; + console.log('Calc[IndexPage] handleEqual'); + this.dataChange('expression', 'equal'); } + }, + handleExist() { + console.log('Calc[IndexPage] handleExist'); + app.terminate(); + } }; \ No newline at end of file diff --git a/common/ECG/.gitignore b/common/ECG/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/common/ECG/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/common/ECG/README_zh.md b/common/ECG/README_zh.md index 9c156c5ff..9a5d060f4 100644 --- a/common/ECG/README_zh.md +++ b/common/ECG/README_zh.md @@ -22,7 +22,7 @@ Stack:堆叠容器,子组件按照顺序依次入栈,后一个子组件覆 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 3.如果安装本示例报错为error:install sign info inconsistent,则有可能本应用被设置为系统预置应用,已安装在系统中,此时需使用命令进行替换安装,并在替换安装后对设备进行重启操作,具体命令如下: diff --git a/common/ECG/entry/src/main/js/default/app.js b/common/ECG/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/common/ECG/entry/src/main/js/default/app.js +++ b/common/ECG/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/common/ECG/entry/src/main/js/default/pages/index/index.css b/common/ECG/entry/src/main/js/default/pages/index/index.css index e5e9577f9..e31ac9c10 100644 --- a/common/ECG/entry/src/main/js/default/pages/index/index.css +++ b/common/ECG/entry/src/main/js/default/pages/index/index.css @@ -43,38 +43,46 @@ display: flex; flex-shrink: 1; } + .hundredImg { left: 100px; object-fit: contain; display: flex; flex-shrink: 1; } + .chart_t_r { width: 80px; height: 40px; color: #a6a6a6; } + .stack_main { width: 100%; height: 60%; flex-direction: column; justify-content: center; } + .chart_bg { width: 100%; height: 100%; } + .chart { width: 100%; height: 171px; } + .chart_time { text-align: center; color: white; } + font_size { font-size: 38px; } + .div_bottom { width: 100%; height: 20%; diff --git a/common/ECG/entry/src/main/js/default/pages/index/index.hml b/common/ECG/entry/src/main/js/default/pages/index/index.hml index 458d99130..fa547a2f5 100644 --- a/common/ECG/entry/src/main/js/default/pages/index/index.hml +++ b/common/ECG/entry/src/main/js/default/pages/index/index.hml @@ -13,22 +13,24 @@ limitations under the License. -->
-
- - - - - - {{ $t('strings.times_minute') }} - -
- - - - -
- - {{ chartTime }}{{ $t('strings.count_down') }} - -
+
+ + + + + + {{ $t('strings.times_minute') }} + +
+ + + + +
+ + {{ chartTime }}{{ $t('strings.count_down') }} + +
\ No newline at end of file diff --git a/common/ECG/entry/src/main/js/default/pages/index/index.js b/common/ECG/entry/src/main/js/default/pages/index/index.js index 325a11538..19a909fdf 100644 --- a/common/ECG/entry/src/main/js/default/pages/index/index.js +++ b/common/ECG/entry/src/main/js/default/pages/index/index.js @@ -13,199 +13,207 @@ * limitations under the License. */ export default { - data: { - hundredImg: "/common/A054_110.png", - tensImg: "/common/A054_110.png", - onesImg: "/common/A054_110.png", - tensLeft: "100px", - onesLeft: "120px", - chartUnit: "170px", - hundredDisplay: "none", - realHrValue: 0, - moving: false, - leftNum: 0, - passTime: 0, - chartTime: 30, - chartHeartImg: '/common/A054_078.png', - isFill: false, - chartHeartInterval: '', - electrocardInterval: '', - heartDataInterval: '', - maskLeft: 454, - tipTop: "320px", - hideFlag: false, - isBreak: true, - digMaskLeft: 454, - times_minute: "", - ecgData: [ - 45,45,45,46,46,46,46,47,47,47, - 47,46,46,46,46,46,46,45,45,45, - 44,44,45,49,73,94,97,80,51,43, - 42,43,43,43,43,43,43,43,43,43, - 44,44,44,44,44,45,45,45,45,46, - 46,47,47,47,48,48,49,50,51,52, - 54,54,55,56,56,55,54,53,52,48, - 47,45,45,44,44,43,43,43,43,43, - 44,44,44,44,45,45,45,46,46,46, - 46,46,46,46,47,47,47,47,47,47 - ], - heartData: [70,78,80,89,90,85,95,99,101,106,118], - datasets: [ - { - strokeColor: '#fc3159', - data: [50] - } - ], - options: { - xAxis: { display: false, min: 0, max: 454}, - yAxis: { display: false, min: 0, max: 100}, - series: { - lineStyle: { - width: "5", - smooth: true - }, - headPoint: { - shape: 'circle', - size: '8px', - strokeColor: '#ffffff', - fillColor: '#ffffff', - }, - loop: { - margin: 30, - gradient: true - } - } + data: { + hundredImg: "/common/A054_110.png", + tensImg: "/common/A054_110.png", + onesImg: "/common/A054_110.png", + tensLeft: "100px", + onesLeft: "120px", + chartUnit: "170px", + hundredDisplay: "none", + realHrValue: 0, + moving: false, + leftNum: 0, + passTime: 0, + chartTime: 30, + chartHeartImg: '/common/A054_078.png', + isFill: false, + chartHeartInterval: '', + electrocardInterval: '', + heartDataInterval: '', + maskLeft: 454, + tipTop: "320px", + hideFlag: false, + isBreak: true, + digMaskLeft: 454, + times_minute: "", + ecgData: [ + 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, + 47, 46, 46, 46, 46, 46, 46, 45, 45, 45, + 44, 44, 45, 49, 73, 94, 97, 80, 51, 43, + 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 44, 44, 44, 44, 44, 45, 45, 45, 45, 46, + 46, 47, 47, 47, 48, 48, 49, 50, 51, 52, + 54, 54, 55, 56, 56, 55, 54, 53, 52, 48, + 47, 45, 45, 44, 44, 43, 43, 43, 43, 43, + 44, 44, 44, 44, 45, 45, 45, 46, 46, 46, + 46, 46, 46, 46, 47, 47, 47, 47, 47, 47 + ], + heartData: [70, 78, 80, 89, 90, 85, 95, 99, 101, 106, 118], + datasets: [ + { + strokeColor: '#fc3159', + data: [50] + } + ], + options: { + xAxis: { + display: false, min: 0, max: 454 + }, + yAxis: { + display: false, min: 0, max: 100 + }, + series: { + lineStyle: { + width: "5", + smooth: true + }, + headPoint: { + shape: 'circle', + size: '8px', + strokeColor: '#ffffff', + fillColor: '#ffffff', + }, + loop: { + margin: 30, + gradient: true } - }, - onInit() { - this.times_minute = this.$t('strings.times_minute'); - }, - onShow() { - this.startChartHeart(); - this.handleMeasureData(); - }, - onHide() { - console.log('onHide'); - this.clearChart() - this.clearTimes() - }, - handleMeasureData() { - this.updateElectrocarddiogram(); - this.updateHeart(); - }, - updateElectrocarddiogram() { - let minEcgIndex = 0; - let maxEcgIndex = 99; - let curEcgIndex = minEcgIndex; - this.electrocardInterval = setInterval(() => { - let arrayObj = []; - for (let i = 0; i < 13; i++) { - if (curEcgIndex == maxEcgIndex) { - curEcgIndex = minEcgIndex; - } else { - arrayObj.push(this.ecgData[curEcgIndex]); - curEcgIndex++; - } - } - this.addChartDate(arrayObj); - this.handleCountDown(); - }, 100); - }, - updateHeart() { - this.heartDataInterval = setInterval(() => { - this.realHrValue = this.heartData[Math.floor(Math.random() * this.heartData.length)]; - }, 1000); - }, - addChartDate(list) { - let appendDate = { serial: 0, data: list }; - this.$refs.chart.append(appendDate); - }, - handleCountDown() { - let countdownValue = 30; - this.passTime++; - if (this.passTime % 10 == 0) { - countdownValue -= (this.passTime / 10); - this.setRealHrValue(); - if (countdownValue > 0) { - if (countdownValue < 10) { - this.chartTime = '0' + countdownValue; - } else { - this.chartTime = countdownValue; - } - } else { - this.chartTime = 0; - } + } + } + }, + onInit() { + this.times_minute = this.$t('strings.times_minute'); + }, + onShow() { + this.startChartHeart(); + this.handleMeasureData(); + }, + onHide() { + console.log('onHide'); + this.clearChart() + this.clearTimes() + }, + handleMeasureData() { + this.updateElectrocarddiogram(); + this.updateHeart(); + }, + updateElectrocarddiogram() { + let minEcgIndex = 0; + let maxEcgIndex = 99; + let curEcgIndex = minEcgIndex; + this.electrocardInterval = setInterval(() => { + let arrayObj = []; + for (let i = 0; i < 13; i++) { + if (curEcgIndex == maxEcgIndex) { + curEcgIndex = minEcgIndex; + } else { + arrayObj.push(this.ecgData[curEcgIndex]); + curEcgIndex++; } - }, - setRealHrValue() { - let hundreds, tens, ones; - let realHrMin = 0; - let realHrMax = 255; - let doubleAvgHr = 2; - let threeAvgHr = 3; - let subIndexZero = 0; - let subIndexOne = 1; - let subIndexTwo = 2; - let subIndexEnd = 3; - if (this.realHrValue == realHrMin || this.realHrValue == realHrMax) { - this.initRealHrValue(); + } + this.addChartDate(arrayObj); + this.handleCountDown(); + }, 100); + }, + updateHeart() { + this.heartDataInterval = setInterval(() => { + this.realHrValue = this.heartData[Math.floor(Math.random() * this.heartData.length)]; + }, 1000); + }, + addChartDate(list) { + let appendDate = { + serial: 0, data: list + }; + this.$refs.chart.append(appendDate); + }, + handleCountDown() { + let countdownValue = 30; + this.passTime++; + if (this.passTime % 10 == 0) { + countdownValue -= (this.passTime / 10); + this.setRealHrValue(); + if (countdownValue > 0) { + if (countdownValue < 10) { + this.chartTime = '0' + countdownValue; } else { - this.times_minute = this.$t('strings.ecg_times_minute_many_id'); - let number = this.realHrValue.toString(); - if (number.length == doubleAvgHr) { - this.hundredDisplay = 'none'; - this.tensLeft = '100px'; - this.onesLeft = '120px'; - this.chartUnit = '170px'; - tens = number.substring(subIndexZero, subIndexOne); - ones = number.substring(subIndexOne, subIndexTwo); - this.tensImg = '/common/A054_10' + tens + '.png'; - this.onesImg = '/common/A054_10' + ones + '.png'; - } else if (number.length == threeAvgHr) { - this.hundredDisplay = 'block'; - this.tensLeft = '130px'; - this.onesLeft = '150px'; - this.chartUnit = '170px'; - hundreds = number.substring(subIndexZero, subIndexOne); - tens = number.substring(subIndexOne, subIndexTwo); - ones = number.substring(subIndexTwo, subIndexEnd); - this.hundredImg = '/common/A054_10' + hundreds + '.png'; - this.tensImg = '/common/A054_10' + tens + '.png'; - this.onesImg = '/common/A054_10' + ones + '.png'; - } else { - } + this.chartTime = countdownValue; } - }, - initRealHrValue() { + } else { + this.chartTime = 0; + } + } + }, + setRealHrValue() { + let hundreds, tens, ones; + let realHrMin = 0; + let realHrMax = 255; + let doubleAvgHr = 2; + let threeAvgHr = 3; + let subIndexZero = 0; + let subIndexOne = 1; + let subIndexTwo = 2; + let subIndexEnd = 3; + if (this.realHrValue == realHrMin || this.realHrValue == realHrMax) { + this.initRealHrValue(); + } else { + this.times_minute = this.$t('strings.ecg_times_minute_many_id'); + let number = this.realHrValue.toString(); + if (number.length == doubleAvgHr) { this.hundredDisplay = 'none'; this.tensLeft = '100px'; this.onesLeft = '120px'; this.chartUnit = '170px'; - this.tensImg = '/common/A054_110.png'; - this.onesImg = '/common/A054_110.png'; - }, - startChartHeart() { - let chartHeartIndex = 78; - let chartEndHeartIndex = 97; - let heartImgIndex = chartHeartIndex; - this.chartHeartInterval = setInterval(() => { - if (heartImgIndex == chartEndHeartIndex) { - heartImgIndex = chartHeartIndex; - } else { - this.chartHeartImg = '/common/A054_0' + heartImgIndex + '.png'; - heartImgIndex++; - } - }, 50); - }, - clearTimes() { - clearInterval(this.chartHeartInterval); - clearInterval(this.electrocardInterval); - clearInterval(this.heartDataInterval); - }, - clearChart() { - this.chartTime = 30; - this.datasets = [{ strokeColor: '#fc3159', data: [50]}]; + tens = number.substring(subIndexZero, subIndexOne); + ones = number.substring(subIndexOne, subIndexTwo); + this.tensImg = '/common/A054_10' + tens + '.png'; + this.onesImg = '/common/A054_10' + ones + '.png'; + } else if (number.length == threeAvgHr) { + this.hundredDisplay = 'block'; + this.tensLeft = '130px'; + this.onesLeft = '150px'; + this.chartUnit = '170px'; + hundreds = number.substring(subIndexZero, subIndexOne); + tens = number.substring(subIndexOne, subIndexTwo); + ones = number.substring(subIndexTwo, subIndexEnd); + this.hundredImg = '/common/A054_10' + hundreds + '.png'; + this.tensImg = '/common/A054_10' + tens + '.png'; + this.onesImg = '/common/A054_10' + ones + '.png'; + } else { + } } + }, + initRealHrValue() { + this.hundredDisplay = 'none'; + this.tensLeft = '100px'; + this.onesLeft = '120px'; + this.chartUnit = '170px'; + this.tensImg = '/common/A054_110.png'; + this.onesImg = '/common/A054_110.png'; + }, + startChartHeart() { + let chartHeartIndex = 78; + let chartEndHeartIndex = 97; + let heartImgIndex = chartHeartIndex; + this.chartHeartInterval = setInterval(() => { + if (heartImgIndex == chartEndHeartIndex) { + heartImgIndex = chartHeartIndex; + } else { + this.chartHeartImg = '/common/A054_0' + heartImgIndex + '.png'; + heartImgIndex++; + } + }, 50); + }, + clearTimes() { + clearInterval(this.chartHeartInterval); + clearInterval(this.electrocardInterval); + clearInterval(this.heartDataInterval); + }, + clearChart() { + this.chartTime = 30; + this.datasets = [{ + strokeColor: '#fc3159', data: [50] + }]; + } } diff --git a/common/ECG/package.json b/common/ECG/package.json index 22166ab82..75cf93354 100644 --- a/common/ECG/package.json +++ b/common/ECG/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } \ No newline at end of file diff --git a/common/Flashlight/.gitignore b/common/Flashlight/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/common/Flashlight/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/common/Flashlight/README_zh.md b/common/Flashlight/README_zh.md index 6a2c773da..0a5cf34ee 100644 --- a/common/Flashlight/README_zh.md +++ b/common/Flashlight/README_zh.md @@ -22,7 +22,7 @@ 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 3.如果安装本示例报错为error:install sign info inconsistent,则有可能本应用被设置为系统预置应用,已安装在系统中,此时需使用命令进行替换安装,并在替换安装后对设备进行重启操作,具体命令如下: diff --git a/common/Flashlight/entry/src/main/js/default/app.js b/common/Flashlight/entry/src/main/js/default/app.js index 58d12b7b5..6d4065abc 100644 --- a/common/Flashlight/entry/src/main/js/default/app.js +++ b/common/Flashlight/entry/src/main/js/default/app.js @@ -14,10 +14,10 @@ */ export default { - onCreate() { - console.info("Application onCreate"); - }, - onDestroy() { - console.info("Application onDestroy"); - } + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } }; diff --git a/common/Flashlight/entry/src/main/js/default/pages/index/index.hml b/common/Flashlight/entry/src/main/js/default/pages/index/index.hml index d93af6f89..dc1e44eec 100644 --- a/common/Flashlight/entry/src/main/js/default/pages/index/index.hml +++ b/common/Flashlight/entry/src/main/js/default/pages/index/index.hml @@ -13,9 +13,9 @@ limitations under the License. --> -
- - {{ time }} -
+
+ + {{ time }} +
\ No newline at end of file diff --git a/common/Flashlight/entry/src/main/js/default/pages/index/index.js b/common/Flashlight/entry/src/main/js/default/pages/index/index.js index 4be071386..2b9b391e4 100644 --- a/common/Flashlight/entry/src/main/js/default/pages/index/index.js +++ b/common/Flashlight/entry/src/main/js/default/pages/index/index.js @@ -15,43 +15,44 @@ import app from '@system.app'; export default { - data: { - lightShow: true, - time: '' - }, - onInit() { - setTimeout(() => { - app.terminate(); - }, 300000); - }, - onShow() { - this.refreshTime(); - }, - onDestroy() {}, - refreshTime() { - setTimeout(() => { - let nowTime = new Date(); - let minutes = nowTime.getMinutes(); - let hours = nowTime.getHours(); - let minStr = ''; - let hourStr = ''; - if (minutes < 10) { - minStr = '0' + minutes.toString(); - } else { - minStr = minutes.toString(); - } - if (hours < 10) { - hourStr = '0' + hours.toString(); - } else { - hourStr = hours.toString(); - } - this.time = hourStr + ':' + minStr; - this.refreshTime(); - }, 1000); - }, - changeMode() { - this.lightShow = !this.lightShow; - } + data: { + lightShow: true, + time: '' + }, + onInit() { + setTimeout(() => { + app.terminate(); + }, 300000); + }, + onShow() { + this.refreshTime(); + }, + onDestroy() { + }, + refreshTime() { + setTimeout(() => { + let nowTime = new Date(); + let minutes = nowTime.getMinutes(); + let hours = nowTime.getHours(); + let minStr = ''; + let hourStr = ''; + if (minutes < 10) { + minStr = '0' + minutes.toString(); + } else { + minStr = minutes.toString(); + } + if (hours < 10) { + hourStr = '0' + hours.toString(); + } else { + hourStr = hours.toString(); + } + this.time = hourStr + ':' + minStr; + this.refreshTime(); + }, 1000); + }, + changeMode() { + this.lightShow = !this.lightShow; + } } diff --git a/common/Flashlight/package.json b/common/Flashlight/package.json index 853387125..9bc4425a1 100644 --- a/common/Flashlight/package.json +++ b/common/Flashlight/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } -} \ No newline at end of file +} diff --git a/common/Runninglock/entry/src/main/ets/MainAbility/common/lockSwitch.ets b/common/Runninglock/entry/src/main/ets/MainAbility/common/lockSwitch.ets index 31836e206..5f64a9c28 100644 --- a/common/Runninglock/entry/src/main/ets/MainAbility/common/lockSwitch.ets +++ b/common/Runninglock/entry/src/main/ets/MainAbility/common/lockSwitch.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import lock from '@ohos.runninglock' +import lock from '@ohos.runningLock' import Logger from '../util/Logger' const TAG: string = 'RunningLock' diff --git a/common/Runninglock/entry/src/main/ets/MainAbility/pages/index.ets b/common/Runninglock/entry/src/main/ets/MainAbility/pages/index.ets index 052dbd4f8..89dd03c2f 100644 --- a/common/Runninglock/entry/src/main/ets/MainAbility/pages/index.ets +++ b/common/Runninglock/entry/src/main/ets/MainAbility/pages/index.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import lock from '@ohos.runninglock' +import lock from '@ohos.runningLock' import { LockSwitch } from '../common/lockSwitch' import Logger from '../util/Logger' diff --git a/data/DDMQuery/.gitignore b/data/DDMQuery/.gitignore new file mode 100644 index 000000000..4222b9919 --- /dev/null +++ b/data/DDMQuery/.gitignore @@ -0,0 +1,8 @@ +/node_modules +/local.properties +/.idea +**/build +/.hvigor +/build-profile.json5 +/package-lock.json +/entry/package-lock.json \ No newline at end of file diff --git a/data/DDMQuery/README_zh.md b/data/DDMQuery/README_zh.md index b95f7ef4f..63141b716 100644 --- a/data/DDMQuery/README_zh.md +++ b/data/DDMQuery/README_zh.md @@ -32,4 +32,4 @@ KvStoreResultSet:提供获取KVStore数据库结果集的方法,提供查询 1.本示例仅支持在标准系统上运行。 -2.本示例需要使用DevEco Studio 3.0 Beta3 (Build Version: 3.0.0.901, built on May 30, 2022)才可编译运行。 \ No newline at end of file +2.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 \ No newline at end of file diff --git a/data/DDMQuery/entry/src/main/ets/MainAbility/pages/Index.ets b/data/DDMQuery/entry/src/main/ets/MainAbility/pages/Index.ets index d65513a68..54744183f 100644 --- a/data/DDMQuery/entry/src/main/ets/MainAbility/pages/Index.ets +++ b/data/DDMQuery/entry/src/main/ets/MainAbility/pages/Index.ets @@ -19,9 +19,8 @@ import { TitleBar } from "../common/TitleBar" @Entry @Component struct Index { - build() { - Column(){ + Column() { TitleBar() Query() } diff --git a/data/DDMQuery/package.json b/data/DDMQuery/package.json index e6ddf8f92..ef64eda02 100644 --- a/data/DDMQuery/package.json +++ b/data/DDMQuery/package.json @@ -8,8 +8,8 @@ }, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } diff --git a/device/Bluetooth/README_zh.md b/device/Bluetooth/README_zh.md index 59aa0e92e..f5af0a7fd 100644 --- a/device/Bluetooth/README_zh.md +++ b/device/Bluetooth/README_zh.md @@ -34,6 +34,6 @@ 2.本示例仅支持API9版本SDK,本示例涉及使用系统接口:cancelPairedDevice(),需要手动替换Full SDK才能编译通过,具体操作可参考[替换指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md)。 -3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。。 +3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。 4.本示例所配置的权限ohos.permission.MANAGE_BLUETOOTH为system_basic级别(相关权限级别可通过[权限定义列表](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/permission-list.md)查看),需要手动配置对应级别的权限签名(具体操作可查看[自动化签名方案](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ohos-auto-configuring-signature-information-0000001271659465))。 \ No newline at end of file diff --git a/device/Browser/AppScope/app.json5 b/device/Browser/AppScope/app.json5 index b8f840ab2..88cbd2163 100644 --- a/device/Browser/AppScope/app.json5 +++ b/device/Browser/AppScope/app.json5 @@ -1,6 +1,6 @@ { "app": { - "bundleName": "ohos.samples.browser1", + "bundleName": "ohos.samples.browser", "vendor": "samples", "versionCode": 1000000, "versionName": "1.0.0", diff --git a/device/Browser/entry/src/main/resources/rawfile/favicon.ico b/device/Browser/entry/src/main/resources/rawfile/favicon.ico deleted file mode 100644 index fdc021cfebd1341e379d891a8218f4d299def273..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmdUzZ%h++7{|}>!WVlXVb1x#pq&DWR47zh6;y73GeD>~rXy%Z$CDCJMr@18>sJM6hKZI)g0>F@4$ zzvuZp_uO65lws!4Cp?_tznKf646}$~m`H-Am=uDapWf(P*mDnfFu^bY{ug-LGQ&Kr z>LO2bj()N!2k!c8xPHlm^ZQ+}Rj1c*=Tp;ybuHfZoJ6lK*WhW*#ZnC(M6Z62)2rKqC;7Q){|?wcNp?C;DT|&-4INow=y=she)#i`KI}hN zodNDV3$A?H4||CUjuVPT`_VY*Q`OPAyVU$?>PTPy24jyp$~{n!IP9q0IVSY~G5;6a zVLP)Gwo@wDiWJ}q;+)*u>+}9?4d#+@dQ|o$Y6SFJqAuDXy#gjyP7>{*h{gyrG9bOXQhq)yvxA*tySr; zoJ)m;{ML^)!&0n(`B*%Rhhs2&FcJg%q;6f$ft0z_U@DO14DVYDF@#)>@6t;x-=sM$ zU+#eUvt*b{l`y@R0AryHLx-XsSI}_~x)wrb`~?n(RBLoqA?G5p02mnqYRO5}RO z@mSnH9EE%PBhaZ{iuQLSOdVah)PvUpz6Z7=u`B^G{P~5s{=(>@o_D0qj@On!_r?-y z_pR-?+m!`ScfEa>n_GoQh7HVu+c))Od`49IltwNt(j-JjGblu&F&MtMp z{?Vd1mVg+uy<-j0p(BkimDz4cV7|2&!>tQpxD$cNJ4ifOFhVx&5jd0b`{67 z1jLvfH-2@!)^#lsj;2+x{6;BJV<==C+Q-w220))MML7z}L^+}Eu`uU=8?8}m>5<7X0B0%G{a|5+DbHg!b? z>H)^CMZwv$8r;nlFx_5+p|-^sxFc=pZq)_H3av%R$mpdMgKyAc!hF&Jxz!bqbO zwwo)p=G!mM>AHoyQx)W|AioI0I%pJ^c)zz+K3xOfgNM&z!0*~jE}!3mljk { - console.error(`MusicPlayer[PlayerModel] player error`); - }); - this.#player.on('finish', () => { - console.log('MusicPlayer[PlayerModel] finish() callback is called'); - this.notifyPlayingStatus(false); - }); - this.#player.on('timeUpdate', () => { - console.log('MusicPlayer[PlayerModel] timeUpdate() callback is called ') - }); - console.info('MusicPlayer[PlayerModel] initAudioPlayer end'); - } + initAudioPlayer() { + console.info('MusicPlayer[PlayerModel] initAudioPlayer begin'); + this.#player.on('error', () => { + console.error(`MusicPlayer[PlayerModel] player error`); + }); + this.#player.on('finish', () => { + console.log('MusicPlayer[PlayerModel] finish() callback is called'); + this.notifyPlayingStatus(false); + }); + this.#player.on('timeUpdate', () => { + console.log('MusicPlayer[PlayerModel] timeUpdate() callback is called ') + }); + console.info('MusicPlayer[PlayerModel] initAudioPlayer end'); + } - release() { - if (typeof (this.#player) != 'undefined') { - console.info('MusicPlayer[PlayerModel] player.release begin'); - this.#player.release(); - console.info('MusicPlayer[PlayerModel] player.release end'); - this.#player = undefined; - } + release() { + if (typeof (this.#player) != 'undefined') { + console.info('MusicPlayer[PlayerModel] player.release begin'); + this.#player.release(); + console.info('MusicPlayer[PlayerModel] player.release end'); + this.#player = undefined; } + } - restorePlayingStatus(status, callback) { - console.info('MusicPlayer[PlayerModel] restorePlayingStatus ' + JSON.stringify(status)); - for (var i = 0; i < this.playlist.audioFiles.length; i++) { - if (this.playlist.audioFiles[i].fileUri === status.uri) { - console.info('MusicPlayer[PlayerModel] restore to index ' + i); - this.preLoad(i, () => { - this.play(status.seekTo, status.isPlaying); - console.info('MusicPlayer[PlayerModel] restore play status'); - callback(i); - }); - return; - } - } - console.warn('MusicPlayer[PlayerModel] restorePlayingStatus failed'); - callback(-1); + restorePlayingStatus(status, callback) { + console.info('MusicPlayer[PlayerModel] restorePlayingStatus ' + JSON.stringify(status)); + for (var i = 0; i < this.playlist.audioFiles.length; i++) { + if (this.playlist.audioFiles[i].fileUri === status.uri) { + console.info('MusicPlayer[PlayerModel] restore to index ' + i); + this.preLoad(i, () => { + this.play(status.seekTo, status.isPlaying); + console.info('MusicPlayer[PlayerModel] restore play status'); + callback(i); + }); + return; + } } + console.warn('MusicPlayer[PlayerModel] restorePlayingStatus failed'); + callback(-1); + } - getPlaylist(callback) { - // generate play list - console.info('MusicPlayer[PlayerModel] generatePlayList'); + getPlaylist(callback) { + // generate play list + console.info('MusicPlayer[PlayerModel] generatePlayList'); - console.info('MusicPlayer[PlayerModel] getAudioAssets begin'); - this.playlist = new Playlist(); - this.playlist.audioFiles = []; - this.playlist.audioFiles[0] = new Song('dynamic.wav', 'system/etc/dynamic.wav', 0); - this.playlist.audioFiles[1] = new Song('demo.wav', 'system/etc/demo.wav', 0); - callback() - console.info('MusicPlayer[PlayerModel] getAudioAssets end'); - } + console.info('MusicPlayer[PlayerModel] getAudioAssets begin'); + this.playlist = new Playlist(); + this.playlist.audioFiles = []; + this.playlist.audioFiles[0] = new Song('dynamic.wav', 'system/etc/dynamic.wav', 0); + this.playlist.audioFiles[1] = new Song('demo.wav', 'system/etc/demo.wav', 0); + callback() + console.info('MusicPlayer[PlayerModel] getAudioAssets end'); + } - setOnStatusChangedListener(callback) { - this.#statusChangedListener = callback; - } + setOnStatusChangedListener(callback) { + this.#statusChangedListener = callback; + } - setOnPlayingProgressListener(callback) { - this.#playingProgressListener = callback; - } + setOnPlayingProgressListener(callback) { + this.#playingProgressListener = callback; + } - notifyPlayingStatus(isPlaying) { - this.isPlaying = isPlaying; - this.#statusChangedListener(this.isPlaying); - console.log('MusicPlayer[PlayerModel] notifyPlayingStatus isPlaying=' + isPlaying + ' intervalId=' + this.#intervalID); - if (isPlaying) { - if (typeof (this.#intervalID) === 'undefined') { - let self = this; - this.#intervalID = setInterval(() => { - if (typeof (self.#playingProgressListener) != "undefined" && self.#playingProgressListener != null) { - var timeMs = self.#player.currentTime; - this.#currentTimeMs = timeMs; - if (typeof (timeMs) === 'undefined') { - timeMs = 0; - } - console.log('MusicPlayer[PlayerModel] player.currentTime=' + timeMs); - self.#playingProgressListener(timeMs); - } - }, 500); - console.log('MusicPlayer[PlayerModel] set update interval ' + this.#intervalID); + notifyPlayingStatus(isPlaying) { + this.isPlaying = isPlaying; + this.#statusChangedListener(this.isPlaying); + console.log('MusicPlayer[PlayerModel] notifyPlayingStatus isPlaying=' + isPlaying + ' intervalId=' + this.#intervalID); + if (isPlaying) { + if (typeof (this.#intervalID) === 'undefined') { + let self = this; + this.#intervalID = setInterval(() => { + if (typeof (self.#playingProgressListener) != "undefined" && self.#playingProgressListener != null) { + var timeMs = self.#player.currentTime; + this.#currentTimeMs = timeMs; + if (typeof (timeMs) === 'undefined') { + timeMs = 0; } - } else { - this.cancelTimer(); - } + console.log('MusicPlayer[PlayerModel] player.currentTime=' + timeMs); + self.#playingProgressListener(timeMs); + } + }, 500); + console.log('MusicPlayer[PlayerModel] set update interval ' + this.#intervalID); + } + } else { + this.cancelTimer(); } + } - cancelTimer() { - if (typeof (this.#intervalID) != 'undefined') { - console.log('MusicPlayer[PlayerModel] clear update interval ' + this.#intervalID); - clearInterval(this.#intervalID); - this.#intervalID = undefined; - } + cancelTimer() { + if (typeof (this.#intervalID) != 'undefined') { + console.log('MusicPlayer[PlayerModel] clear update interval ' + this.#intervalID); + clearInterval(this.#intervalID); + this.#intervalID = undefined; } + } - preLoad(index, callback) { - console.info('MusicPlayer[PlayerModel] preLoad ' + index + "/" + this.playlist.audioFiles.length); - if (index < 0 || index >= this.playlist.audioFiles.length) { - console.error('MusicPlayer[PlayerModel] preLoad ignored'); - return 0; - } - this.index = index; + preLoad(index, callback) { + console.info('MusicPlayer[PlayerModel] preLoad ' + index + "/" + this.playlist.audioFiles.length); + if (index < 0 || index >= this.playlist.audioFiles.length) { + console.error('MusicPlayer[PlayerModel] preLoad ignored'); + return 0; + } + this.index = index; - let uri = this.playlist.audioFiles[index].fileUri - fileIo.open(uri, (err, fdNumber) => { - let fdPath = 'fd://' - let source = fdPath + fdNumber + let uri = this.playlist.audioFiles[index].fileUri + fileIo.open(uri, (err, fdNumber) => { + let fdPath = 'fd://' + let source = fdPath + fdNumber - if (typeof (source) === 'undefined') { - console.error('MusicPlayer[PlayerModel] preLoad ignored, source=' + source); - return; - } - console.info('MusicPlayer[PlayerModel] preLoad ' + source + ' begin'); - console.info('MusicPlayer[PlayerModel] state=' + this.#player.state); - let self = this; - if (source === this.#player.src && this.#player.state != 'idle') { - console.info('MusicPlayer[PlayerModel] preLoad finished. src not changed'); - callback(); - } else if (this.#player.state === 'idle') { - this.#player.on('dataLoad', () => { - console.info('MusicPlayer[PlayerModel] dataLoad callback, state=' + self.#player.state); - callback(); - }); - console.info('MusicPlayer[PlayerModel] player.src=' + source); - this.#player.src = source; - } else { - this.notifyPlayingStatus(false); - this.cancelTimer(); - console.info('MusicPlayer[PlayerModel] player.reset'); - self.#player.reset(); - console.info('MusicPlayer[PlayerModel] player.reset done, state=' + self.#player.state); - self.#player.on('dataLoad', () => { - console.info('MusicPlayer[PlayerModel] dataLoad callback, state=' + self.#player.state); - callback(); - }); - console.info('MusicPlayer[PlayerModel] player.src=' + source); - self.#player.src = source; - } - console.info('MusicPlayer[PlayerModel] preLoad ' + source + ' end'); - }) - } + if (typeof (source) === 'undefined') { + console.error('MusicPlayer[PlayerModel] preLoad ignored, source=' + source); + return; + } + console.info('MusicPlayer[PlayerModel] preLoad ' + source + ' begin'); + console.info('MusicPlayer[PlayerModel] state=' + this.#player.state); + let self = this; + if (source === this.#player.src && this.#player.state != 'idle') { + console.info('MusicPlayer[PlayerModel] preLoad finished. src not changed'); + callback(); + } else if (this.#player.state === 'idle') { + this.#player.on('dataLoad', () => { + console.info('MusicPlayer[PlayerModel] dataLoad callback, state=' + self.#player.state); + callback(); + }); + console.info('MusicPlayer[PlayerModel] player.src=' + source); + this.#player.src = source; + } else { + this.notifyPlayingStatus(false); + this.cancelTimer(); + console.info('MusicPlayer[PlayerModel] player.reset'); + self.#player.reset(); + console.info('MusicPlayer[PlayerModel] player.reset done, state=' + self.#player.state); + self.#player.on('dataLoad', () => { + console.info('MusicPlayer[PlayerModel] dataLoad callback, state=' + self.#player.state); + callback(); + }); + console.info('MusicPlayer[PlayerModel] player.src=' + source); + self.#player.src = source; + } + console.info('MusicPlayer[PlayerModel] preLoad ' + source + ' end'); + }) + } - getDuration() { - console.info('MusicPlayer[PlayerModel] getDuration index=' + this.index); - if (this.playlist.audioFiles[this.index].duration > 0) { - return this.playlist.audioFiles[this.index].duration; - } - console.info('MusicPlayer[PlayerModel] getDuration state=' + this.#player.state); - if (this.#player.state === 'idle') { - console.warn('MusicPlayer[PlayerModel] getDuration ignored, player.state=' + this.#player.state); - return 0; - } - this.playlist.audioFiles[this.index].duration = Math.min(this.#player.duration, 97615); - console.info('MusicPlayer[PlayerModel] getDuration player.src=' + this.#player.src + ", player.duration=" + this.playlist.audioFiles[this.index].duration); - return this.playlist.audioFiles[this.index].duration; + getDuration() { + console.info('MusicPlayer[PlayerModel] getDuration index=' + this.index); + if (this.playlist.audioFiles[this.index].duration > 0) { + return this.playlist.audioFiles[this.index].duration; } - - getCurrentMs() { - return this.#currentTimeMs; + console.info('MusicPlayer[PlayerModel] getDuration state=' + this.#player.state); + if (this.#player.state === 'idle') { + console.warn('MusicPlayer[PlayerModel] getDuration ignored, player.state=' + this.#player.state); + return 0; } + this.playlist.audioFiles[this.index].duration = Math.min(this.#player.duration, 97615); + console.info('MusicPlayer[PlayerModel] getDuration player.src=' + this.#player.src + ", player.duration=" + this.playlist.audioFiles[this.index].duration); + return this.playlist.audioFiles[this.index].duration; + } - play(seekTo, startPlay) { - console.info('MusicPlayer[PlayerModel] play seekTo=' + seekTo + ', startPlay=' + startPlay); - this.notifyPlayingStatus(startPlay); - if (startPlay) { - if (seekTo < 0 && this.#currentTimeMs > 0) { - console.info('MusicPlayer[PlayerModel] pop seekTo=' + this.#currentTimeMs); - seekTo = this.#currentTimeMs; - } - let self = this; - this.#player.on('play', (err, action) => { - if (err) { - console.error(`MusicPlayer[PlayerModel] error returned in play() callback`); - return; - } - console.log('MusicPlayer[PlayerModel] play() callback entered, player.state=' + self.#player.state); - if (seekTo > 0) { - self.seek(seekTo); - } - }); - console.info('MusicPlayer[PlayerModel] call player.play'); - this.#player.play(); - console.info('MusicPlayer[PlayerModel] player.play called player.state=' + this.#player.state); - } else if (seekTo > 0) { - this.#playingProgressListener(seekTo); - this.#currentTimeMs = seekTo; - console.info('MusicPlayer[PlayerModel] stash seekTo=' + this.#currentTimeMs); + getCurrentMs() { + return this.#currentTimeMs; + } + + play(seekTo, startPlay) { + console.info('MusicPlayer[PlayerModel] play seekTo=' + seekTo + ', startPlay=' + startPlay); + this.notifyPlayingStatus(startPlay); + if (startPlay) { + if (seekTo < 0 && this.#currentTimeMs > 0) { + console.info('MusicPlayer[PlayerModel] pop seekTo=' + this.#currentTimeMs); + seekTo = this.#currentTimeMs; + } + let self = this; + this.#player.on('play', (err, action) => { + if (err) { + console.error(`MusicPlayer[PlayerModel] error returned in play() callback`); + return; } + console.log('MusicPlayer[PlayerModel] play() callback entered, player.state=' + self.#player.state); + if (seekTo > 0) { + self.seek(seekTo); + } + }); + console.info('MusicPlayer[PlayerModel] call player.play'); + this.#player.play(); + console.info('MusicPlayer[PlayerModel] player.play called player.state=' + this.#player.state); + } else if (seekTo > 0) { + this.#playingProgressListener(seekTo); + this.#currentTimeMs = seekTo; + console.info('MusicPlayer[PlayerModel] stash seekTo=' + this.#currentTimeMs); } + } - pause() { - if (!this.isPlaying) { - console.info('MusicPlayer[PlayerModel] pause ignored, isPlaying=' + this.isPlaying); - return; - } - this.notifyPlayingStatus(false); - console.info('MusicPlayer[PlayerModel] call player.pause'); - this.#player.pause(); - console.info('MusicPlayer[PlayerModel] player.pause called, player.state=' + this.#player.state); + pause() { + if (!this.isPlaying) { + console.info('MusicPlayer[PlayerModel] pause ignored, isPlaying=' + this.isPlaying); + return; } + this.notifyPlayingStatus(false); + console.info('MusicPlayer[PlayerModel] call player.pause'); + this.#player.pause(); + console.info('MusicPlayer[PlayerModel] player.pause called, player.state=' + this.#player.state); + } - seek(ms) { - this.#currentTimeMs = ms; - if (this.isPlaying) { - console.log('MusicPlayer[PlayerModel] player.seek ' + ms); - this.#player.seek(ms); - } else { - console.log('MusicPlayer[PlayerModel] stash seekTo=' + ms); - } + seek(ms) { + this.#currentTimeMs = ms; + if (this.isPlaying) { + console.log('MusicPlayer[PlayerModel] player.seek ' + ms); + this.#player.seek(ms); + } else { + console.log('MusicPlayer[PlayerModel] stash seekTo=' + ms); } + } - stop() { - if (!this.isPlaying) { - console.info('MusicPlayer[PlayerModel] stop ignored, isPlaying=' + this.isPlaying); - return; - } - this.notifyPlayingStatus(false); - console.info('MusicPlayer[PlayerModel] call player.stop'); - this.#player.stop(); - console.info('MusicPlayer[PlayerModel] player.stop called, player.state=' + this.#player.state); + stop() { + if (!this.isPlaying) { + console.info('MusicPlayer[PlayerModel] stop ignored, isPlaying=' + this.isPlaying); + return; } + this.notifyPlayingStatus(false); + console.info('MusicPlayer[PlayerModel] call player.stop'); + this.#player.stop(); + console.info('MusicPlayer[PlayerModel] player.stop called, player.state=' + this.#player.state); + } } \ No newline at end of file diff --git a/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.hml b/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.hml index f6bf819a5..beeb54095 100644 --- a/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.hml +++ b/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.hml @@ -14,42 +14,42 @@ -->
-
- -
- - {{ title }} - +
+ +
+ + {{ title }} + -
-
- -
-
- -
-
- -
-
- -
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + {{ $t('strings.media') }} +
+
+ 0 + + 15 +
+
+ +
- -
-
- - {{ $t('strings.media') }} -
-
- 0 - - 15 -
-
- -
-
-
+
diff --git a/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.js b/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.js index 4374b78ee..b2b777761 100644 --- a/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.js +++ b/media/JsAudioPlayer/entry/src/main/js/default/pages/index/index.js @@ -17,97 +17,97 @@ import audio from '@ohos.multimedia.audio' import PlayerModel from '../../common/PlayerModel.js'; export default { - data: { - title: '', - audioUrl: '', - index: 0, - audioPlayer: null, - isSwitching: false, - playerModel: new PlayerModel(), - audioManager: null, - volume: 0 - }, - onInit() { + data: { + title: '', + audioUrl: '', + index: 0, + audioPlayer: null, + isSwitching: false, + playerModel: new PlayerModel(), + audioManager: null, + volume: 0 + }, + onInit() { + this.audioUrl = 'common/images/pause.png'; + this.playerModel.setOnStatusChangedListener((isPlaying) => { + console.info('MusicPlayer[IndexPage] on player status changed, isPlaying=' + isPlaying + ', refresh ui'); + if (isPlaying) { + this.audioUrl = 'common/images/play.png'; + } else { this.audioUrl = 'common/images/pause.png'; - this.playerModel.setOnStatusChangedListener((isPlaying) => { - console.info('MusicPlayer[IndexPage] on player status changed, isPlaying=' + isPlaying + ', refresh ui'); - if (isPlaying) { - this.audioUrl = 'common/images/play.png'; - } else { - this.audioUrl = 'common/images/pause.png'; - } - }); - this.playerModel.getPlaylist(() => { - console.info('MusicPlayer[IndexPage] on playlist generated, refresh ui'); - }); - this.title = this.playerModel.playlist.audioFiles[this.index].name; - this.audioManager = audio.getAudioManager(); - }, - onPlayClick() { - if (this.isSwitching) { - console.info('MusicPlayer[IndexPage] onPlayClick ignored, isSwitching'); - return; - } - console.info('MusicPlayer[IndexPage] onPlayClick, isPlaying=' + this.playerModel.isPlaying); - if (this.playerModel.isPlaying) { - this.playerModel.pause(); - } else { - this.playerModel.preLoad(this.index, () => { - this.playerModel.play(-1, true); - }); - } - }, - onPreviousClick() { - if (this.isSwitching) { - console.info('MusicPlayer[IndexPage] onPreviousClick ignored, isSwitching'); - return; - } - console.info('MusicPlayer[IndexPage] onPreviousClick'); - this.index--; - if (this.index < 0 && this.playerModel.playlist.audioFiles.length >= 1) { - this.index = this.playerModel.playlist.audioFiles.length - 1; - } - this.currentProgress = 0; - this.isSwitching = true; - let self = this; - this.playerModel.preLoad(this.index, () => { - self.playerModel.play(0, true); - self.isSwitching = false; - }); - this.title = this.playerModel.playlist.audioFiles[this.index].name; - }, - onNextClick() { - if (this.isSwitching) { - console.info('MusicPlayer[IndexPage] onNextClick ignored, isSwitching'); - return; - } - console.info('MusicPlayer[IndexPage] onNextClick'); - this.index++; - if (this.index >= this.playerModel.playlist.audioFiles.length) { - this.index = 0; - } - this.currentProgress = 0; - this.isSwitching = true; - let self = this; - this.playerModel.preLoad(this.index, () => { - self.playerModel.play(0, true); - self.isSwitching = false; - }); - this.title = this.playerModel.playlist.audioFiles[this.index].name; - }, - media(e) { - this.volume = e.value - this.audioManager.setVolume(audio.AudioVolumeType.MEDIA, this.volume).then(() => { - console.log('Promise returned to indicate a successful volume setting.'); - }) - - }, - showPanel() { - this.$element('showPanel').show(); - }, - closePanel() { - this.$element('showPanel').close(); + } + }); + this.playerModel.getPlaylist(() => { + console.info('MusicPlayer[IndexPage] on playlist generated, refresh ui'); + }); + this.title = this.playerModel.playlist.audioFiles[this.index].name; + this.audioManager = audio.getAudioManager(); + }, + onPlayClick() { + if (this.isSwitching) { + console.info('MusicPlayer[IndexPage] onPlayClick ignored, isSwitching'); + return; + } + console.info('MusicPlayer[IndexPage] onPlayClick, isPlaying=' + this.playerModel.isPlaying); + if (this.playerModel.isPlaying) { + this.playerModel.pause(); + } else { + this.playerModel.preLoad(this.index, () => { + this.playerModel.play(-1, true); + }); + } + }, + onPreviousClick() { + if (this.isSwitching) { + console.info('MusicPlayer[IndexPage] onPreviousClick ignored, isSwitching'); + return; + } + console.info('MusicPlayer[IndexPage] onPreviousClick'); + this.index--; + if (this.index < 0 && this.playerModel.playlist.audioFiles.length >= 1) { + this.index = this.playerModel.playlist.audioFiles.length - 1; } + this.currentProgress = 0; + this.isSwitching = true; + let self = this; + this.playerModel.preLoad(this.index, () => { + self.playerModel.play(0, true); + self.isSwitching = false; + }); + this.title = this.playerModel.playlist.audioFiles[this.index].name; + }, + onNextClick() { + if (this.isSwitching) { + console.info('MusicPlayer[IndexPage] onNextClick ignored, isSwitching'); + return; + } + console.info('MusicPlayer[IndexPage] onNextClick'); + this.index++; + if (this.index >= this.playerModel.playlist.audioFiles.length) { + this.index = 0; + } + this.currentProgress = 0; + this.isSwitching = true; + let self = this; + this.playerModel.preLoad(this.index, () => { + self.playerModel.play(0, true); + self.isSwitching = false; + }); + this.title = this.playerModel.playlist.audioFiles[this.index].name; + }, + media(e) { + this.volume = e.value + this.audioManager.setVolume(audio.AudioVolumeType.MEDIA, this.volume).then(() => { + console.log('Promise returned to indicate a successful volume setting.'); + }) + + }, + showPanel() { + this.$element('showPanel').show(); + }, + closePanel() { + this.$element('showPanel').close(); + } } diff --git a/media/JsAudioPlayer/package.json b/media/JsAudioPlayer/package.json index b329e588e..ddfc4f26e 100644 --- a/media/JsAudioPlayer/package.json +++ b/media/JsAudioPlayer/package.json @@ -11,8 +11,8 @@ "repository": {}, "version": "1.0.0", "dependencies": { - "@ohos/hypium": "1.0.0", - "@ohos/hvigor-ohos-plugin": "1.1.3", - "@ohos/hvigor": "1.1.3" + "@ohos/hypium": "1.0.1", + "@ohos/hvigor-ohos-plugin": "1.1.6", + "@ohos/hvigor": "1.1.6" } } -- Gitee