Browse Source

fix: 修复closeOnClickOverlay参数失效问题

杨凯旋 5 years ago
parent
commit
c980ba95ad
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/packages/popup/popup.vue

+ 9 - 1
src/packages/popup/popup.vue

@@ -131,7 +131,9 @@ export default {
       if (this.opened) {
         return;
       }
-
+      if(this.closeOnClickOverlay){
+        this.showSlot = true;
+      }
       this.opened = true;
       this.$emit('open');
 
@@ -204,7 +206,13 @@ export default {
         if (!overlayManager.lockCount) {
           document.body.classList.remove('nut-overflow-hidden');
         }
+      } 
+      if(this.closeOnClickOverlay){
+        setTimeout(()=>{
+          this.showSlot = false;
+        },this.duration*1000)        
       }
+      
 
       overlayManager.closeOverlay(this);
       this.$emit('input', false);