修复Area组件最大化功能,确保填充满父容器

This commit is contained in:
zqm
2025-11-04 09:10:15 +08:00
parent 7df715f612
commit 8c8419d3e3
3 changed files with 109 additions and 27 deletions

View File

@@ -1,26 +1,33 @@
<template>
<div class="dock-layout">
<!-- 主区域 -->
<Area :WindowState="windowState" :showTitleBar="false" title="主区域" />
<!-- 浮动区域列表 -->
<Area
v-for="area in floatingAreas"
:key="area.id"
:id="area.id"
:title="area.title"
:WindowState="area.WindowState"
v-model:WindowState="area.WindowState"
:showTitleBar="area.showTitleBar"
:width="area.width"
:height="area.height"
:style="{
:left="area.WindowState !== '最大化' ? area.x : undefined"
:top="area.WindowState !== '最大化' ? area.y : undefined"
:style="area.WindowState !== '最大化' ? {
position: 'absolute',
left: area.x + 'px',
top: area.y + 'px',
zIndex: 10
} : {
zIndex: 100
}"
@close="onCloseFloatingArea(area.id)"
/>
<!-- 主区域 -->
<Area
:WindowState="windowState"
:showTitleBar="false"
title="主区域"
:style="{ position: 'relative', zIndex: 1 }"
/>
</div>
</template>
@@ -100,7 +107,7 @@ defineExpose({
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
overflow: visible;
}
/* 浮动区域样式已直接应用到Area组件 */