Merge pull request #505 from ReedSun/wxc-mask-bug-fix
[!] wxc-mask: fix bug that inconsistent behavior between clicking close button and clicking overlay
diff --git a/packages/wxc-mask/index.vue b/packages/wxc-mask/index.vue
index a6b9cb0..6a1a545 100644
--- a/packages/wxc-mask/index.vue
+++ b/packages/wxc-mask/index.vue
@@ -22,7 +22,8 @@
<template>
<div class="container">
- <wxc-overlay :show="show && hasOverlay"
+ <wxc-overlay ref="overlay"
+ :show="show && hasOverlay"
v-if="show"
v-bind="mergeOverlayCfg"
:can-auto-close="overlayCanClose"
@@ -191,7 +192,10 @@
},
methods: {
closeIconClicked () {
- this.appearMask(false);
+ this.$refs.overlay.appearOverlay(false);
+ if (!this.overlayCanClose) {
+ this.appearMask(false);
+ }
},
wxcOverlayBodyClicking () {
if (this.hasAnimation) {