From 0e274944e11094012aa2e1557df8fe438b3b6d20 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 十二月 2021 14:25:13 +0800
Subject: [PATCH] 2021-12-14

---
 src/tabviews/zshare/actionList/popupbutton/index.jsx |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx
index 4c1fe85..b870f79 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -55,7 +55,7 @@
   }
 
   componentDidMount () {
-    MKEmitter.addListener('popclose', this.popclose)
+    MKEmitter.addListener('popclose', this.syspopclose)
     MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     MKEmitter.addListener('openNewTab', this.openNewTab)
     MKEmitter.addListener('refreshPopButton', this.refreshPopButton)
@@ -83,7 +83,7 @@
     this.setState = () => {
       return
     }
-    MKEmitter.removeListener('popclose', this.popclose)
+    MKEmitter.removeListener('popclose', this.syspopclose)
     MKEmitter.removeListener('openNewTab', this.openNewTab)
     MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
     MKEmitter.removeListener('refreshPopButton', this.refreshPopButton)
@@ -178,6 +178,12 @@
     }
   }
 
+  syspopclose = () => {
+    if (!this.state.visible) return
+
+    this.popclose()
+  }
+
   /**
    * @description 寮圭獥鍏抽棴
    */
@@ -210,7 +216,7 @@
         className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')}
         title={btn.label}
         width={ratio}
-        maskClosable={false}
+        maskClosable={btn.clickouter === 'close'}
         visible={visible}
         onCancel={this.popclose}
         footer={[
@@ -254,7 +260,7 @@
           className={btn.$view === 'CustomPage' ? 'custom-drawer-popview' : ''}
           width={width}
           height={height}
-          maskClosable={false}
+          maskClosable={btn.clickouter === 'close'}
           onClose={this.popclose}
           visible={visible}
           placement={btn.placement || 'right'}

--
Gitblit v1.8.0