提交 9c02d8ec 编写于 作者: V vben

fix: fix modal dragging failure when destroyOnClose=true (#51)

上级 1c075a7a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册