fix: People context menu show properly

This commit is contained in:
2026-06-15 00:10:52 +08:00
parent 11b3b4b395
commit 681a235e77

View File

@@ -331,6 +331,8 @@ function playTrace(t: any) {
}
function showContextMenu(e: MouseEvent, p: any) {
e.preventDefault()
e.stopPropagation()
ctxMenu.value = { show: true, x: e.clientX, y: e.clientY, person: p }
}
@@ -361,7 +363,10 @@ function ctxAction(action: string) {
}
}
function closeCtxMenu() { ctxMenu.value.show = false }
function closeCtxMenu(e?: MouseEvent) {
if (e && e.target instanceof Element && e.target.closest('.ms-ctx-menu')) return
ctxMenu.value.show = false
}
watch(showCandidates, (v) => { if (v) loadCandidates() })
</script>