fix: 拖动Modal穿透复制文字挂载.ant-pro-page-container
This commit is contained in:
@@ -122,8 +122,11 @@ watch(
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal
|
||||||
|
wrapClassName="draggable-modal"
|
||||||
|
get-container=".ant-pro-page-container"
|
||||||
:width="props.width"
|
:width="props.width"
|
||||||
:keyboard="props.keyboard"
|
:keyboard="props.keyboard"
|
||||||
|
:mask="props.mask"
|
||||||
:mask-closable="props.maskClosable"
|
:mask-closable="props.maskClosable"
|
||||||
:visible="props.visible"
|
:visible="props.visible"
|
||||||
:confirm-loading="props.confirmLoading"
|
:confirm-loading="props.confirmLoading"
|
||||||
@@ -135,7 +138,11 @@ watch(
|
|||||||
@cancel="e => emit('cancel', e)"
|
@cancel="e => emit('cancel', e)"
|
||||||
>
|
>
|
||||||
<template #title>
|
<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>
|
||||||
<template #modalRender="{ originVNode }">
|
<template #modalRender="{ originVNode }">
|
||||||
<div :style="transformStyle">
|
<div :style="transformStyle">
|
||||||
@@ -146,9 +153,14 @@ watch(
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less">
|
||||||
.draggable-title {
|
.draggable-modal {
|
||||||
width: 100%;
|
&.ant-modal-wrap {
|
||||||
cursor: move;
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
&-title {
|
||||||
|
width: 100%;
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user