From ee902161445f1907f17e54045ff96f610802bacf Mon Sep 17 00:00:00 2001 From: zqm Date: Tue, 6 Jan 2026 16:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E9=9D=A2=E6=9D=BF=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Robot/Web/src/DockLayout/TabPage.vue | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/TabPage.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/TabPage.vue index 61add52..f71ebbe 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/TabPage.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/TabPage.vue @@ -87,16 +87,16 @@
- -
- -
+ + -
+
没有可显示的内容
@@ -182,6 +182,13 @@ const shouldShowTabs = computed(() => { return props.showTabs && childrenCount > 1 }) +// 计算属性:获取当前激活的子组件 +const activeChild = computed(() => { + if (!props.children || activeTabIndex.value < 0) return null + const childrenArray = Array.isArray(props.children) ? props.children : [props.children] + return childrenArray[activeTabIndex.value] +}) + // 设置激活的标签页 const setActiveTab = (index) => { if (!props.children) return