Commit 4a64d4ee by Joey

fix(@gms/gms-plugin-billexpand): vxetable中弹出modal点击会消失

- vxetable会在document监听点击事件取消选中,所以绑定在document中的modal会被误判
parent 2a995a33
...@@ -25,9 +25,11 @@ ...@@ -25,9 +25,11 @@
<template> <template>
<div class="dept-person-div"> <div class="dept-person-div">
<Modal <Modal
ref="modal"
v-model="visible" v-model="visible"
:title="title" :title="title"
:width="modalWidth" :width="modalWidth"
:mask-closable="false"
@on-ok="onOk" @on-ok="onOk"
@on-cancel="onCancel" @on-cancel="onCancel"
> >
...@@ -134,8 +136,15 @@ export default { ...@@ -134,8 +136,15 @@ export default {
window.onresize = () => { window.onresize = () => {
this.getModalHeight() this.getModalHeight()
} }
this.$refs.modal.$el.addEventListener('click', this.stopPropagation)
},
beforeUnmount() {
this.$refs.modal.$el.removeeventlistener('click', this.stopPropagation)
}, },
methods: { methods: {
stopPropagation(event) {
event.stopPropagation()
},
getModalHeight() { getModalHeight() {
let viewport = window.innerHeight let viewport = window.innerHeight
if (viewport <= 600 && viewport >= 400) { if (viewport <= 600 && viewport >= 400) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment