Commit cafa4e040394cbb504968f16e52342ff42e71d8a

Authored by Aresn
Committed by GitHub
2 parents 8e7ac210 f3454b37

Merge pull request #1256 from MarvinWilliam/2.0

add modal hidden event
Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
src/components/modal/modal.vue
... ... @@ -4,7 +4,7 @@
4 4 <div :class="maskClasses" v-show="visible" @click="mask"></div>
5 5 </transition>
6 6 <div :class="wrapClasses" @click="handleWrapClick">
7   - <transition :name="transitionNames[0]">
  7 + <transition :name="transitionNames[0]" @after-leave="animationFinish">
8 8 <div :class="classes" :style="mainStyles" v-show="visible">
9 9 <div :class="[prefixCls + '-content']">
10 10 <a :class="[prefixCls + '-close']" v-if="closable" @click="close">
... ... @@ -208,6 +208,9 @@
208 208 removeScrollEffect() {
209 209 document.body.style.overflow = '';
210 210 this.resetScrollBar();
  211 + },
  212 + animationFinish() {
  213 + this.$emit('on-hidden');
211 214 }
212 215 },
213 216 mounted () {
... ...