解决事件泄漏问题

This commit is contained in:
zqm
2025-12-26 13:09:35 +08:00
parent efa9fd64c7
commit 7f2f31156f
13 changed files with 924 additions and 1098 deletions

View File

@@ -123,7 +123,9 @@ const handleMouseMove = (event: MouseEvent) => {
// 结束调整大小
const endResize = () => {
isResizing.value = false
emitEvent(EVENT_TYPES.RESIZE_END, { direction: props.direction, targetId: props.targetId })
emitEvent(EVENT_TYPES.RESIZE_END, { direction: props.direction, targetId: props.targetId }, {
source: { component: 'ResizeBar', targetId: props.targetId, direction: props.direction }
})
// 移除全局鼠标事件监听
document.removeEventListener('mousemove', handleMouseMove)