From 14df3f0b7b67562c1929eab12a514b3b993aff1f Mon Sep 17 00:00:00 2001 From: sfchu Date: Sun, 28 Sep 2025 16:11:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=A0=8F=E7=9A=84=E5=BA=94=E7=94=A8=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E9=AB=98=E6=80=A7=E8=83=BD=E6=8B=96=E5=8A=A8=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomTitleBarWindowDrag/README.md | 3 +++ .../entry/src/main/ets/entryability/EntryAbility.ets | 2 +- CustomTitleBarWindowDrag/entry/src/main/ets/pages/Index.ets | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CustomTitleBarWindowDrag/README.md b/CustomTitleBarWindowDrag/README.md index 342d809b..d00efac7 100644 --- a/CustomTitleBarWindowDrag/README.md +++ b/CustomTitleBarWindowDrag/README.md @@ -21,6 +21,9 @@ └──entry/src/main/resources // 应用资源目录 ``` +### 使用说明 + - 点击应用中间的蓝色区域,可拖动应用。 + ### 相关权限 不涉及 diff --git a/CustomTitleBarWindowDrag/entry/src/main/ets/entryability/EntryAbility.ets b/CustomTitleBarWindowDrag/entry/src/main/ets/entryability/EntryAbility.ets index 77569cfe..8e736583 100644 --- a/CustomTitleBarWindowDrag/entry/src/main/ets/entryability/EntryAbility.ets +++ b/CustomTitleBarWindowDrag/entry/src/main/ets/entryability/EntryAbility.ets @@ -14,9 +14,9 @@ */ import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { BusinessError } from '@kit.BasicServicesKit'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { window } from '@kit.ArkUI'; -import { BusinessError } from '@kit.BasicServicesKit'; const DOMAIN = 0x0000; diff --git a/CustomTitleBarWindowDrag/entry/src/main/ets/pages/Index.ets b/CustomTitleBarWindowDrag/entry/src/main/ets/pages/Index.ets index f48b0049..ec0f151b 100644 --- a/CustomTitleBarWindowDrag/entry/src/main/ets/pages/Index.ets +++ b/CustomTitleBarWindowDrag/entry/src/main/ets/pages/Index.ets @@ -14,8 +14,8 @@ */ // [Start drag_sample] -import { window } from '@kit.ArkUI'; import { BusinessError } from '@kit.BasicServicesKit'; +import { window } from '@kit.ArkUI'; const COLUMN_WIDTH = 108; const COLUMN_TOP = 50; @@ -25,7 +25,7 @@ const COLUMN_LEFT = 100; @Component struct Index { // get the window manager from AppStorage - private windowStage = AppStorage.get('window') as window.WindowStage; + windowStage: window.WindowStage = AppStorage.get('window') as window.WindowStage; build() { Column() { -- Gitee