Merge pull request #763 from WoolenWang/new_bug_fix_761

修复dragable的新窗口弹出被dragable父组件遮挡
This commit is contained in:
Aresn 2021-01-11 15:19:54 +08:00 committed by GitHub
commit 9295257383
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View file

@ -40,7 +40,7 @@
import { on, off } from '../../utils/dom';
import { findComponentsDownward } from '../../utils/assist';
import { transferIndex as modalIndex, transferIncrease as modalIncrease } from '../../utils/transfer-queue';
import { transferIndex as modalIndex, transferIncrease as modalIncrease, lastVisibleIndex, lastVisibleIncrease } from '../../utils/transfer-queue';
const prefixCls = 'ivu-modal';
@ -343,6 +343,10 @@
},
handleClickModal () {
if (this.draggable) {
if (lastVisibleIndex !== this.lastVisibleIndex){
this.lastVisibleIndex = lastVisibleIndex;
return;
}
this.modalIndex = this.handleGetModalIndex();
}
}
@ -379,7 +383,10 @@
this.removeScrollEffect();
}, 300);
} else {
this.modalIndex = this.handleGetModalIndex();
if (this.lastVisible !== val) {
this.modalIndex = this.handleGetModalIndex();
lastVisibleIncrease();
}
if (this.timer) clearTimeout(this.timer);
this.wrapShow = true;
@ -390,6 +397,8 @@
this.broadcast('Table', 'on-visible-change', val);
this.broadcast('Slider', 'on-visible-change', val); // #2852
this.$emit('on-visible-change', val);
this.lastVisible = val;
this.lastVisibleIndex = lastVisibleIndex;
},
loading (val) {
if (!val) {

View file

@ -1,7 +1,12 @@
let transferIndex = 0;
let lastVisibleIndex = 0;
function transferIncrease() {
transferIndex++;
}
export {transferIndex, transferIncrease};
function lastVisibleIncrease() {
lastVisibleIndex++;
}
export { transferIndex, transferIncrease, lastVisibleIndex, lastVisibleIncrease };