|
@@ -29,6 +29,8 @@ export default {
|
|
}, 50) // 适当延迟确保元素渲染
|
|
}, 50) // 适当延迟确保元素渲染
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// 监听对话框打开事件,打开时让对话框居中
|
|
// 监听对话框打开事件,打开时让对话框居中
|
|
const dialogComponent = vnode.componentInstance
|
|
const dialogComponent = vnode.componentInstance
|
|
if (dialogComponent) {
|
|
if (dialogComponent) {
|
|
@@ -74,15 +76,16 @@ export default {
|
|
document.body.style.userSelect = ''
|
|
document.body.style.userSelect = ''
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ const startDrag = () => { }
|
|
|
|
+ const onDrag = () => { }
|
|
|
|
+ const stopDrag = () => { }
|
|
|
|
+
|
|
// 组件销毁时的清理
|
|
// 组件销毁时的清理
|
|
const cleanup = () => {
|
|
const cleanup = () => {
|
|
window.removeEventListener('resize', centerDialog)
|
|
window.removeEventListener('resize', centerDialog)
|
|
- // headerEl.removeEventListener('mousedown', startDrag)
|
|
|
|
- // document.removeEventListener('mousemove', onDrag)
|
|
|
|
- // document.removeEventListener('mouseup', stopDrag)
|
|
|
|
- headerEl.removeEventListener('mousedown', "")
|
|
|
|
- document.removeEventListener('mousemove', "")
|
|
|
|
- document.removeEventListener('mouseup', "")
|
|
|
|
|
|
+ headerEl.removeEventListener('mousedown', startDrag)
|
|
|
|
+ document.removeEventListener('mousemove', onDrag)
|
|
|
|
+ document.removeEventListener('mouseup', stopDrag)
|
|
}
|
|
}
|
|
|
|
|
|
// Vue2销毁钩子
|
|
// Vue2销毁钩子
|