ソースを参照

fix: 修复closeOnClickOverlay参数失效问题

杨凯旋 5 年 前
コミット
c980ba95ad
1 ファイル変更9 行追加1 行削除
  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);