Commit f3454b37ff2bec1603e88a81b7cd3640d43fb88f

Authored by marvinwilliam
1 parent 8e7ac210

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 () {
... ...