修复Area组件最大化功能,确保填充满父容器
This commit is contained in:
@@ -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组件 */
|
||||
|
||||
Reference in New Issue
Block a user