From 7eeaa909002d0bd684179ade190d6a321cdcb953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E5=8D=93=E4=BC=A6?= <2658469835@qq.com> Date: Fri, 30 May 2025 17:16:56 +0800 Subject: [PATCH] =?UTF-8?q?feat=20(=E6=A0=87=E8=AF=86):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9DesktopShortcut=E4=BB=93=E5=BA=93=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/entryability/EntryAbility.ets | 4 ++++ entry/src/main/module.json5 | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index eb42ddf..1a66c93 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -13,6 +13,10 @@ * limitations under the License. */ +/* +* 最佳实践: 桌面快捷方式开发实践 +*/ + import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { Router, window } from '@kit.ArkUI'; diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index 946cdea..21457ae 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -1,5 +1,11 @@ +/* +* 最佳实践: 桌面快捷方式开发实践 +*/ + +// [Start module_json5] { "module": { + // [StartExclude module_json5] "name": "entry", "type": "entry", "description": "$string:module_desc", @@ -10,23 +16,26 @@ "deliveryWithInstall": true, "installationFree": false, "pages": "$profile:main_pages", + // [EndExclude module_json5] "abilities": [ { "name": "EntryAbility", "srcEntry": "./ets/entryability/EntryAbility.ets", + // [StartExclude module_json5] "description": "$string:EntryAbility_desc", "icon": "$media:app_icon", "label": "$string:EntryAbility_label", "startWindowIcon": "$media:app_icon", "startWindowBackground": "$color:start_window_background", "exported": true, + // [EndExclude module_json5] "skills": [ { "entities": [ "entity.system.home" ], "actions": [ - "action.system.home" + "ohos.want.action.home" ] } ], @@ -38,6 +47,7 @@ ] } ], + // [End module_json5] "extensionAbilities": [ { "name": "EntryBackupAbility", @@ -51,6 +61,8 @@ } ], } - ] + ], + // [Start module_json5] } -} \ No newline at end of file +} +// [End module_json5] \ No newline at end of file -- Gitee