From a3ac1b4636cf446804bb1947d6a5d2dd6c3bc030 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 13 十二月 2020 17:16:54 +0800
Subject: [PATCH] 2020-12-13

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

diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx
index a82689f..c29a385 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -15,6 +15,7 @@
 class NormalButton extends Component {
   static propTpyes = {
     show: PropTypes.any,              // 鎸夐挳鏄剧ず鏍峰紡鎺у埗
+    position: PropTypes.any,          // 鎸夐挳浣嶇疆锛屽伐鍏锋爮涓簍oolbar
     BID: PropTypes.string,            // 涓昏〃ID
     BData: PropTypes.any,             // 涓昏〃鏁版嵁
     selectedData: PropTypes.any,      // 瀛愯〃涓�夋嫨鏁版嵁
@@ -38,9 +39,9 @@
   }
 
   componentDidMount () {
-    const { show } = this.props
+    const { position } = this.props
 
-    if (show === 'actionList') {
+    if (position === 'toolbar') {
       MKEmitter.addListener('triggerBtnId', this.actionTrigger)
     }
   }
@@ -55,7 +56,7 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId) => {
+  actionTrigger = (triggerId, record) => {
     const { setting, Tab, BID, btn, selectedData } = this.props
     const { loading } = this.state
 
@@ -70,7 +71,7 @@
       return
     }
 
-    let data = selectedData || []
+    let data = record || selectedData || []
 
     if (btn.Ot === 'requiredSgl' && data.length !== 1) {
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁

--
Gitblit v1.8.0