解决事件泄漏问题
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user