From 21cd94cc7d4b1ebb96593d7959d8b806a45fe564 Mon Sep 17 00:00:00 2001 From: JoyD <12854922+zqm114@user.noreply.gitee.com> Date: Thu, 30 Oct 2025 21:43:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=BD=E5=8F=96=E6=B5=AE=E5=8A=A8?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=B8=BAPanel.vue=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Robot/Web/src/DockLayout/Panel.vue | 140 ++++++++++++++++++ .../Robot/Web/src/views/DockLayoutTest.vue | 59 ++------ 2 files changed, 156 insertions(+), 43 deletions(-) create mode 100644 AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue new file mode 100644 index 0000000..0be7e66 --- /dev/null +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue @@ -0,0 +1,140 @@ + + + + + \ No newline at end of file diff --git a/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue b/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue index f794142..6360031 100644 --- a/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue +++ b/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue @@ -44,57 +44,30 @@
- -
+ -
- -
-
- {{ panel.title }} -
-
- - - -
-
- -
-
- 工具栏 - -
- -
- -
-
-
+ :id="panel.id" + :title="panel.title" + :x="panel.x" + :y="panel.y" + :width="panel.width" + :height="panel.height" + :collapsed="panel.collapsed" + :toolbarExpanded="panel.toolbarExpanded" + @toggleCollapse="toggleCollapse" + @maximize="maximizePanel" + @close="closePanel" + @toggleToolbar="toggleToolbarExpand" + />
+ + \ No newline at end of file diff --git a/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue b/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue index 6360031..166ac14 100644 --- a/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue +++ b/AutoRobot/Windows/Robot/Web/src/views/DockLayoutTest.vue @@ -11,6 +11,12 @@ > 添加浮动窗口 +
@@ -44,6 +50,18 @@
+ +
+ + + +
+ import { ref } from 'vue'; import Panel from '../DockLayout/Panel.vue'; +import Area from '../DockLayout/Area.vue'; // 顶部控制栏按钮的引用 const layoutFileInput = ref(null); const panelHost = ref(null); // 浮动面板列表 const floatingPanels = ref([]); +// 面板区域列表 +const panelAreas = ref([]); let nextPanelIdx = 1; +let nextAreaIdx = 1; function addPanel(position) { console.log('[DockLayoutTest] addPanel clicked:', position); @@ -99,6 +121,22 @@ function addFloatingPanel() { floatingPanels.value.push(panel); } +function addPanelArea() { + // 添加浮动面板区域 + const defaultSize = { width: 400, height: 300 }; + const offset = 24; + const idx = nextAreaIdx++; + const area = { + id: 'area-' + idx, + title: '面板区域 ' + idx, + x: offset * idx, + y: offset * idx, + width: defaultSize.width, + height: defaultSize.height + }; + panelAreas.value.push(area); +} + function closePanel(id) { floatingPanels.value = floatingPanels.value.filter(p => p.id !== id); } From 2526da2c45827712e30d5906846b8dc3d35ab1a0 Mon Sep 17 00:00:00 2001 From: JoyD <12854922+zqm114@user.noreply.gitee.com> Date: Thu, 30 Oct 2025 22:36:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(docklayout):=20=E9=87=8D=E7=BB=98=20Ar?= =?UTF-8?q?ea.vue=20=E6=A0=87=E9=A2=98=E6=A0=8F=E4=B8=8E=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E9=9D=A2=E6=9D=BF=E6=A0=8F=E5=B9=B6?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E7=A9=BA=E7=99=BD=E5=8C=BA=E9=85=8D=E8=89=B2?= =?UTF-8?q?=E4=B8=BA=20#f5f7fb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Windows/Robot/Web/src/DockLayout/Area.vue | 57 ++++++------------- 1 file changed, 17 insertions(+), 40 deletions(-) diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue index eac70c1..8b5814c 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue @@ -6,49 +6,26 @@ {{ title || 'GlobalHook_Test' }}
-
- - - +
+ +
- -
-
- 输出 - - × -
-
-
- Git 更改 - - × -
-
- - +
- -
-
-
-
- -
-
初始化、备份和共享存储库。
-
- 🛠️ - 创建 Git 存储库... -
-
从 GitHub 或 Azure DevOps 等联机存储库获取代码。
-
- ⬇️ - 克隆存储库... -
-
检出分支、创建标签、管理子模块...
-
+
@@ -143,7 +120,7 @@ const props = defineProps({ .vs-divider { width: 1px; background: var(--vs-border); } /* 右侧 Git 更改 */ -.vs-right { flex: 1; background: var(--vs-panel); padding: 10px; font-size: 12px; color: #000; } +.vs-right { flex: 1; background: #f5f7fb; padding: 0; } .sec-text { margin-bottom: 8px; } .vs-card { display: inline-flex; align-items: center; gap: 8px;