style: 将右键菜单渲染到顶层
将 WorkspaceConnectionList 组件中的连接右键菜单和标签右键菜单 通过 Vue 的 Teleport 功能直接渲染到 document.body
This commit is contained in:
@@ -907,9 +907,10 @@ const cancelEditingTag = () => {
|
||||
</div>
|
||||
|
||||
<!-- Context Menu -->
|
||||
<teleport to="body">
|
||||
<div
|
||||
v-if="contextMenuVisible"
|
||||
class="fixed bg-background border border-border/50 shadow-xl rounded-lg py-1.5 z-50 min-w-[180px] context-menu"
|
||||
class="fixed bg-background border border-border/50 shadow-xl rounded-lg py-1.5 z-[9999] min-w-[180px] context-menu"
|
||||
:style="{ top: `${contextMenuPosition.y}px`, left: `${contextMenuPosition.x}px` }"
|
||||
@click.stop
|
||||
>
|
||||
@@ -932,11 +933,13 @@ const cancelEditingTag = () => {
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</teleport>
|
||||
|
||||
<!-- 标签右键菜单 -->
|
||||
<teleport to="body">
|
||||
<div
|
||||
v-if="tagContextMenuVisible"
|
||||
class="fixed bg-background border border-border/50 shadow-xl rounded-lg py-1.5 z-50 min-w-[200px] tag-context-menu"
|
||||
class="fixed bg-background border border-border/50 shadow-xl rounded-lg py-1.5 z-[9999] min-w-[200px] tag-context-menu"
|
||||
:style="{ top: `${tagContextMenuPosition.y}px`, left: `${tagContextMenuPosition.x}px` }"
|
||||
@click.stop
|
||||
>
|
||||
@@ -976,6 +979,7 @@ const cancelEditingTag = () => {
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</teleport>
|
||||
|
||||
<teleport to="body">
|
||||
<ManageTagConnectionsModal
|
||||
|
||||
Reference in New Issue
Block a user