diff --git a/README.md b/README.md index 7360a22abfd4e536f9b00a51cd62faad5f0de03c..1de86de8a323078d7708c35ec535dac8f3518caa 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,8 @@ RoundedImageView支持圆角(和椭圆或圆形)的快速 ImageView。它支 ## 兼容性 -支持OpenHarmony API version 9 及以上版本 +- [DevEco Studio版本](https://developer.harmonyos.com/cn/develop/deveco-studio#download):DevEco Studio 3.1Beta1及以上版本。 +- OpenHarmony SDK版本:API version 9及以上版本。 ## 目录结构 @@ -161,4 +162,3 @@ RoundedImageView支持圆角(和椭圆或圆形)的快速 ImageView。它支 本项目基于 [Apache License 2.0](https://gitee.com/openharmony-sig/RoundedImageView/blob/master/LICENSE) ,请自由地享受和参与开源。 - diff --git a/RoundedImageView/hvigorfile.js b/RoundedImageView/hvigorfile.ts similarity index 100% rename from RoundedImageView/hvigorfile.js rename to RoundedImageView/hvigorfile.ts diff --git a/RoundedImageView/package.json b/RoundedImageView/package.json index cb77195216a9f3a25cc25d43106a80939f152834..415b8d955d9a03bd3490e08e5e1f53a8e7a37ddd 100644 --- a/RoundedImageView/package.json +++ b/RoundedImageView/package.json @@ -1,26 +1,27 @@ { - "types":"", - "keywords":[ - "OpenHarmony", - "RoundedImage" - ], - "author":"hihope", - "description":"圆角图片设置组件", - "ohos":{ - "org":"opensource" - }, - "main":"index", - "repository":"https://gitee.com/openharmony-sig/RoundedImageView", - "version":"1.0.3", - "tags":[ - "OpenHarmony", - "RoundedImage", - "UI" - ], - "dependencies":{ - "@ohos/svg":"1.1.0" - }, - "license":"Apache License 2.0", - "devDependencies":{}, - "name":"@ohos/roundedimageview" -} \ No newline at end of file + "types": "", + "keywords": [ + "OpenHarmony", + "RoundedImage" + ], + "author": "hihope", + "description": "圆角图片设置组件", + "ohos": { + "org": "opensource" + }, + "main": "index", + "repository": "https://gitee.com/openharmony-sig/RoundedImageView", + "type": "module", + "version": "1.0.3", + "tags": [ + "OpenHarmony", + "RoundedImage", + "UI" + ], + "dependencies": { + "@ohos/svg": "1.1.0" + }, + "license": "Apache License 2.0", + "devDependencies": {}, + "name": "@ohos/roundedimageview" +} diff --git a/build-profile.json5 b/build-profile.json5 index c0404776890bcefcaa793f3e43d75b62f3c7107b..57d0ac017b0e128d837dc0d1d89153ab3bea3abe 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -1,14 +1,13 @@ { "app": { - "signingConfigs": [], "compileSdkVersion": 9, "compatibleSdkVersion": 9, "products": [ { "name": "default", - "signingConfig": "default", + "signingConfig": "default" } - ] + ], }, "modules": [ { diff --git a/entry/package.json b/entry/package.json index 1cc56705bcb743dc83d200e21c4a9126ac10ce48..c51a2cbfbeca862038341d814876671568aa473b 100644 --- a/entry/package.json +++ b/entry/package.json @@ -1,16 +1,16 @@ { - "license":"Apache License 2.0", - "devDependencies":{}, - "name":"entry", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.3", - "dependencies":{ - "@ohos/roundedimageview":"file:../Roundedimageview" - } -} \ No newline at end of file + "license": "Apache License 2.0", + "devDependencies": {}, + "name": "entry", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.3", + "dependencies": { + "@ohos/roundedimageview": "file:../Roundedimageview" + } +} diff --git a/entry/src/main/ets/Application/AbilityStage.ts b/entry/src/main/ets/Application/AbilityStage.ts deleted file mode 100644 index ab2682985f2ed3ade10aefeecb9501a67eb05fbc..0000000000000000000000000000000000000000 --- a/entry/src/main/ets/Application/AbilityStage.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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 AbilityStage from "@ohos.application.AbilityStage" - -export default class MyAbilityStage extends AbilityStage { - onCreate() { - console.log("[Demo] MyAbilityStage onCreate") - } -} \ No newline at end of file diff --git a/entry/src/main/ets/MainAbility/MainAbility.ts b/entry/src/main/ets/MainAbility/MainAbility.ts deleted file mode 100644 index 28d517354809fc8d6d732ebe7a401cd8d298640c..0000000000000000000000000000000000000000 --- a/entry/src/main/ets/MainAbility/MainAbility.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 Ability from '@ohos.application.Ability' -import display from '@ohos.display'; - -export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate") - globalThis.abilityWant = want; - globalThis.globalFilesDir = this.context.filesDir - let displayWH = display.getDefaultDisplaySync() - globalThis.deviceW = displayWH.width; - globalThis.deviceH = displayWH.height; - globalThis.resourceManager = this.context.resourceManager; - globalThis.context = this.context - } - - // requestPermission() { - // let array: Array = ["ohos.permission.READ_MEDIA", "ohos.permission.WRITE_MEDIA"]; - // this.context.requestPermissionsFromUser(array).then(function (data) { - // console.log("data permissions:" + data.permissions); - // console.log("data result:" + data.authResults); - // }, (err) => { - // console.error('Failed to start ability', err.code); - // }); - // } - - onDestroy() { - console.log("[Demo] MainAbility onDestroy") - } - - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate") - - windowStage.setUIContent(this.context, "pages/index", null) - } - - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy") - } - - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground") - } - - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground") - } -} diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index 39d79d34dd950c8fcb2ded81b9858f57067bd72b..d8fe77fe3ecc3ecbf0b7d894c098c31f56564031 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -2,7 +2,6 @@ "module": { "name": "entry", "type": "entry", - "srcEntrance": "./ets/Application/AbilityStage.ts", "description": "$string:entry_desc", "mainElement": "MainAbility", "deviceTypes": [ @@ -12,6 +11,13 @@ "deliveryWithInstall": true, "installationFree": false, "pages": "$profile:main_pages", + "uiSyntax": "ets", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "true" + } + ], "requestPermissions": [ { "name": "ohos.permission.INTERNET" @@ -20,7 +26,7 @@ "abilities": [ { "name": "MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "srcEntrance": "./ets/entryability/EntryAbility.ts", "description": "$string:MainAbility_desc", "icon": "$media:icon", "label": "$string:MainAbility_label", diff --git a/package.json b/package.json index 895a6ac76852d5d59157b67288c4a259ac920426..adb6a8c47bd7daa7b0441cc7eed449defd75be75 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,20 @@ { - "license":"Apache License 2.0", - "private":true, - "devDependencies":{}, - "name":"roundimageview", - "ohos":{ - "org":"huawei", - "directoryLevel":"project", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.3", - "dependencies":{ - "@ohos/hypium":"1.0.2", - "@ohos/hvigor-ohos-plugin":"1.2.2", - "hypium":"^1.0.0", - "@ohos/hvigor":"1.2.2" - } -} \ No newline at end of file + "license": "Apache License 2.0", + "private": true, + "devDependencies": {}, + "name": "roundimageview", + "ohos": { + "org": "huawei", + "directoryLevel": "project", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.3", + "dependencies": { + "@ohos/hypium": "1.0.2", + "@ohos/hvigor-ohos-plugin": "1.4.0", + "hypium": "^1.0.0", + "@ohos/hvigor": "1.4.0" + } +}