diff --git a/UI/JsBasicComponents/README_zh.md b/UI/JsBasicComponents/README_zh.md index 7838c0e7ec6d1befa05ba4cd820f4d601e75c3e9..c35ab02551e63b2c1cbf3398a3b072499558e80e 100644 --- a/UI/JsBasicComponents/README_zh.md +++ b/UI/JsBasicComponents/README_zh.md @@ -6,8 +6,8 @@ ### 使用说明 -通过滑动列表,点击组件,查看各组件的视图效果和点击效果,以及与组件交互的是实现方法。 -组件之间相互独立,可以在需求相同的地方重复是使用。 +通过滑动列表,点击组件,查看各组件的视图效果和点击效果,以及与组件交互的实现方法。 +组件之间相互独立,可以在需求相同的地方重复使用。 ### 约束与限制 diff --git a/UI/JsBasicComponents/build.gradle b/UI/JsBasicComponents/build.gradle index b2d91b2309022766cd1f638545369a910c9265fc..544c600aead0fa0716621e5de7795a8d420ec3ea 100644 --- a/UI/JsBasicComponents/build.gradle +++ b/UI/JsBasicComponents/build.gradle @@ -1,11 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. apply plugin: 'com.huawei.ohos.app' + //For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 ohos { - compileSdkVersion 7 + compileSdkVersion 8 supportSystem "standard" } - + buildscript { repositories { maven { @@ -16,7 +17,7 @@ buildscript { } } dependencies { - classpath 'com.huawei.ohos:hap:3.0.3.2' + classpath 'com.huawei.ohos:hap:3.0.5.2' } } @@ -28,6 +29,5 @@ allprojects { maven { url 'https://developer.huawei.com/repo/' } - jcenter() } } diff --git a/UI/JsBasicComponents/entry/build.gradle b/UI/JsBasicComponents/entry/build.gradle index cb1b043b0ac22c936d09041dc7bfecd617931472..e7ab61a295250d4e5c32d2096a53451cf045bbf3 100644 --- a/UI/JsBasicComponents/entry/build.gradle +++ b/UI/JsBasicComponents/entry/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.huawei.ohos.hap' //For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 ohos { - compileSdkVersion 7 + compileSdkVersion 8 defaultConfig { compatibleSdkVersion 7 } @@ -13,4 +13,4 @@ ohos { } } } -} \ No newline at end of file +} diff --git a/UI/JsBasicComponents/entry/src/main/config.json b/UI/JsBasicComponents/entry/src/main/config.json index 9d4eb918d19d19e2a792f6f1695f6e0f427d77ea..819890c13a2e03a9dee8a0ffea2dafec156114cb 100644 --- a/UI/JsBasicComponents/entry/src/main/config.json +++ b/UI/JsBasicComponents/entry/src/main/config.json @@ -1,16 +1,17 @@ { "app": { - "bundleName": "ohos.samples.jsbasiccomponent", + "bundleName": "ohos.samples.jsbasiccomponents", + "vendor": "samples", "version": { "code": 1000000, - "name": "1.0" + "name": "1.0.0" } }, "deviceConfig": {}, "module": { - "package": "ohos.samples.jsbasiccomponent", + "package": "ohos.samples.jsbasiccomponents", "name": ".MyApplication", - "mainAbility": ".default", + "mainAbility": ".MainAbility", "deviceType": [ "phone" ], @@ -32,12 +33,14 @@ ] } ], + "orientation": "unspecified", "visible": true, - "name": ".default", - "icon": "$media:icon", - "srcPath": "default", + "srcPath": "MainAbility", + "name": ".MainAbility", "srcLanguage": "js", - "description": "$string:mainability_description", + "icon": "$media:icon", + "description": "$string:description_mainability", + "formsEnabled": false, "label": "$string:app_name", "type": "page", "launchType": "standard" @@ -48,7 +51,7 @@ "pages": [ "pages/index/index" ], - "name": ".default" + "name": ".MainAbility" } ] } diff --git a/UI/JsBasicComponents/entry/src/main/js/MainAbility/app.js b/UI/JsBasicComponents/entry/src/main/js/MainAbility/app.js new file mode 100644 index 0000000000000000000000000000000000000000..6d060ffe5682c19fc83e2274a9e62cbc40a655f8 --- /dev/null +++ b/UI/JsBasicComponents/entry/src/main/js/MainAbility/app.js @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info("Application onCreate"); + }, + onDestroy() { + console.info("Application onDestroy"); + } +}; diff --git a/UI/JsBasicComponents/entry/src/main/js/default/common/images/Wallpaper.png b/UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/Wallpaper.png similarity index 100% rename from UI/JsBasicComponents/entry/src/main/js/default/common/images/Wallpaper.png rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/Wallpaper.png diff --git a/UI/JsBasicComponents/entry/src/main/js/default/common/images/bg-tv.jpg b/UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/bg-tv.jpg similarity index 100% rename from UI/JsBasicComponents/entry/src/main/js/default/common/images/bg-tv.jpg rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/bg-tv.jpg diff --git a/UI/JsBasicComponents/entry/src/main/js/default/common/images/like_space.png b/UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/like_space.png similarity index 100% rename from UI/JsBasicComponents/entry/src/main/js/default/common/images/like_space.png rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/like_space.png diff --git a/UI/JsBasicComponents/entry/src/main/js/default/common/images/like_yellow.png b/UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/like_yellow.png similarity index 100% rename from UI/JsBasicComponents/entry/src/main/js/default/common/images/like_yellow.png rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/common/images/like_yellow.png diff --git a/UI/JsBasicComponents/entry/src/main/js/default/i18n/en-US.json b/UI/JsBasicComponents/entry/src/main/js/MainAbility/i18n/en-US.json similarity index 93% rename from UI/JsBasicComponents/entry/src/main/js/default/i18n/en-US.json rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/i18n/en-US.json index b80fa99cafdacf77d4c156b4eacd0869cf7ee269..2a03ef877b7325768a382978de614e66a835800d 100644 --- a/UI/JsBasicComponents/entry/src/main/js/default/i18n/en-US.json +++ b/UI/JsBasicComponents/entry/src/main/js/MainAbility/i18n/en-US.json @@ -1,15 +1,15 @@ { "strings": { - "title_case1":"Case 1:Button", + "title_case1":"Case 1:Button", "title_case2": "Case 2:Image And Text", "title_case3": "Case 3:Marquee", "title_case4": "Case 4:Input", "title_case5": "Case 5:Progress", "title_case6": "Case 6:Select", "title_case7": "Case 7:Piece", - "title_case8": "Case 8: Qrcode", + "title_case8": "Case 8:Qrcode", "title_case9": "Case 9:Toggle", - "title_case10": "Case 10 Switch", + "title_case10": "Case 10:Switch", "title_case11": "Case 11:Rating", "content_case1_t1":"Primary button", diff --git a/UI/JsBasicComponents/entry/src/main/js/default/i18n/zh-CN.json b/UI/JsBasicComponents/entry/src/main/js/MainAbility/i18n/zh-CN.json similarity index 93% rename from UI/JsBasicComponents/entry/src/main/js/default/i18n/zh-CN.json rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/i18n/zh-CN.json index ce267275d5400bfb5390ea38ec6631c6df0565b1..0e350f80ade14e9a64b07ced09ab9aad110a2a5c 100644 --- a/UI/JsBasicComponents/entry/src/main/js/default/i18n/zh-CN.json +++ b/UI/JsBasicComponents/entry/src/main/js/MainAbility/i18n/zh-CN.json @@ -1,15 +1,15 @@ { "strings": { - "title_case1":"Case 1:Button", + "title_case1":"Case 1:Button", "title_case2": "Case 2:Image And Text", "title_case3": "Case 3:Marquee", "title_case4": "Case 4:Input", "title_case5": "Case 5:Progress", "title_case6": "Case 6:Select", "title_case7": "Case 7:Piece", - "title_case8": "Case 8: Qrcode", + "title_case8": "Case 8:Qrcode", "title_case9": "Case 9:Toggle", - "title_case10": "Case 10 Switch", + "title_case10": "Case 10:Switch", "title_case11": "Case 11:Rating", "content_case1_t1":"基本按钮", diff --git a/UI/JsBasicComponents/entry/src/main/js/default/pages/index/index.css b/UI/JsBasicComponents/entry/src/main/js/MainAbility/pages/index/index.css similarity index 99% rename from UI/JsBasicComponents/entry/src/main/js/default/pages/index/index.css rename to UI/JsBasicComponents/entry/src/main/js/MainAbility/pages/index/index.css index aea3139a3f06fa9808f33f0406bd2edfc9052562..85aaf6132dff688e293733d5faa1d19f8bfde03b 100644 --- a/UI/JsBasicComponents/entry/src/main/js/default/pages/index/index.css +++ b/UI/JsBasicComponents/entry/src/main/js/MainAbility/pages/index/index.css @@ -30,12 +30,12 @@ margin-right : 24px; } -.item-class { +.item-div{ flex-direction: column; } .case-title { - font-size: 40px; + font-size: 30px; color: black; font-weight: 900; margin-top: 40px; @@ -350,7 +350,7 @@ align-items : center; width : 100%; margin-top : 20px; - padding-bottom : 400px; + padding-bottom : 300px; } .btn-input { diff --git a/UI/JsBasicComponents/entry/src/main/js/MainAbility/pages/index/index.hml b/UI/JsBasicComponents/entry/src/main/js/MainAbility/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..99f11ef4ec504f8fe7c32ba6a74913c9d5eacc0a --- /dev/null +++ b/UI/JsBasicComponents/entry/src/main/js/MainAbility/pages/index/index.hml @@ -0,0 +1,314 @@ + +