diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue index 77378bd..51f62dd 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/Area.vue @@ -223,6 +223,22 @@ const isSingleTabPageWithMultiplePanels = computed(() => { return false; }); +// 计算属性:TabPage的tabPosition +const tabPagePosition = computed(() => { + // 检查children配置 + if (props.children) { + const childrenArray = Array.isArray(props.children) ? props.children : [props.children]; + + // 只有一个child且是TabPage + if (childrenArray.length === 1 && childrenArray[0].type === 'TabPage') { + return childrenArray[0].tabPosition || 'top'; + } + } + + // 默认top + return 'top'; +}); + // 计算属性:是否显示标题栏 const shouldShowTitleBar = computed(() => { // 基础条件:props.showTitleBar为true @@ -231,8 +247,11 @@ const shouldShowTitleBar = computed(() => { // 单面板场景不显示标题栏 if (isSinglePanel.value) return false; - // 只有一个TabPage且有多个Panel的情况不显示标题栏 - if (isSingleTabPageWithMultiplePanels.value) return false; + // 只有一个TabPage且有多个Panel的情况 + if (isSingleTabPageWithMultiplePanels.value) { + // 当tabPosition为top时显示标题栏,其他位置不显示 + return tabPagePosition.value === 'top'; + } // 检查children配置 if (props.children) { diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue b/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue index b5c10cb..94b8018 100644 --- a/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue +++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/Panel.vue @@ -39,8 +39,8 @@