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