fix: 拖动Modal穿透复制文字挂载.ant-pro-page-container

This commit is contained in:
TsMask
2023-11-25 19:04:48 +08:00
parent af53fe1d89
commit a991cf3370

View File

@@ -122,8 +122,11 @@ watch(
<template>
<a-modal
wrapClassName="draggable-modal"
get-container=".ant-pro-page-container"
:width="props.width"
:keyboard="props.keyboard"
:mask="props.mask"
:mask-closable="props.maskClosable"
:visible="props.visible"
:confirm-loading="props.confirmLoading"
@@ -135,7 +138,11 @@ watch(
@cancel="e => emit('cancel', e)"
>
<template #title>
<div ref="modalTitleRef" class="draggable-title" v-text="title"></div>
<div
ref="modalTitleRef"
class="draggable-modal-title"
v-text="title"
></div>
</template>
<template #modalRender="{ originVNode }">
<div :style="transformStyle">
@@ -146,9 +153,14 @@ watch(
</a-modal>
</template>
<style lang="less" scoped>
.draggable-title {
<style lang="less">
.draggable-modal {
&.ant-modal-wrap {
pointer-events: none;
}
&-title {
width: 100%;
cursor: move;
}
}
</style>