mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-24 04:10:20 +08:00
fix: fix modal dragging failure when destroyOnClose=true (#51)
This commit is contained in:
parent
1c075a7a32
commit
9c02d8ec08
@ -80,17 +80,20 @@ export default defineComponent({
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
const handleDrag = () => {
|
||||
const dragWraps = document.querySelectorAll('.ant-modal-wrap');
|
||||
for (const wrap of dragWraps as any) {
|
||||
const display = getStyle(wrap, 'display');
|
||||
|
||||
const draggable = wrap.getAttribute('data-drag');
|
||||
if (display !== 'none') {
|
||||
// 拖拽位置
|
||||
draggable === null && drag(wrap);
|
||||
(draggable === null || props.destroyOnClose) && drag(wrap);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
if (!props.visible) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user