update Modal

change DOM of Modal,fixed mask scroll bug in chrome 55,fixed mask cover
scrollbar bug
This commit is contained in:
梁灏 2017-02-21 11:36:41 +08:00
parent c13e7cea81
commit 09bce8de83
3 changed files with 31 additions and 25 deletions

View file

@ -1,6 +1,6 @@
<template>
<div :class="wrapClasses">
<div :class="maskClasses" v-show="visible" @click="mask" transition="fade"></div>
<div :class="maskClasses" v-show="visible" @click="mask" transition="fade"></div>
<div :class="wrapClasses" @click="handleWrapClick">
<div :class="classes" :style="styles" v-show="visible" transition="ease">
<div :class="[prefixCls + '-content']">
<a :class="[prefixCls + '-close']" v-if="closable" @click="close">
@ -130,6 +130,10 @@
this.close();
}
},
handleWrapClick (event) {
// use indexOf,do not use === ,because ivu-modal-wrap can have other custom className
if (event.target.getAttribute('class').indexOf(`${prefixCls}-wrap`) > -1) this.mask();
},
cancel () {
this.close();
},

View file

@ -6,6 +6,7 @@
right: 0;
background-color: rgba(55, 55, 55, 0.6);
height: 100%;
z-index: @zindex-modal;
&-hidden {
display: none;