点击修改z-index

This commit is contained in:
zqm
2026-01-05 15:40:40 +08:00
parent 6c30ab376b
commit 3a3fe14153
4 changed files with 107 additions and 24 deletions

View File

@@ -40,7 +40,6 @@
:key="area.id"
:type="'Area'"
:config="area"
:style="{ zIndex: zIndexManager.getFloatingAreaZIndex(area.id) }"
/>
</div>
</template>
@@ -700,14 +699,17 @@ const addFloatingPanel = (panel) => {
}
};
// 生成唯一的areaId
const areaId = `area-${Date.now()}`;
const newArea = {
id: `area-${Date.now()}`,
id: areaId,
type: 'floating', // 添加浮动类型标识
left: 100 + Math.random() * 200,
top: 100 + Math.random() * 200,
width: 300,
height: 200,
zIndex: zIndexManager.getFloatingAreaZIndex(`area-${Date.now()}`),
zIndex: zIndexManager.getFloatingAreaZIndex(areaId),
// 使用children结构以兼容Render组件的渲染逻辑
children: {
type: 'TabPage',