From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 四月 2022 19:23:18 +0800
Subject: [PATCH] 2022-04-26

---
 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 f1b9b3b..0d95d4c 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -43,7 +43,7 @@
 
     if (btn.controlField && selectedData && selectedData.length > 0) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒�
       selectedData.forEach(item => {
-        let s = item[btn.controlField] + ''
+        let s = item[btn.controlField] !== undefined ? item[btn.controlField] + '' : ''
         if (s === btn.controlVal || (btn.controlVal && btn.controlVal.split(',').includes(s))) {
           disabled = true
         }
@@ -85,7 +85,7 @@
     if (btn.controlField && !is(fromJS(nextProps.selectedData || []), fromJS(selectedData || []))) {
       if (nextProps.selectedData && nextProps.selectedData.length > 0) { // 琛ㄦ牸涓寜閽殣钘忔帶鍒�
         nextProps.selectedData.forEach(item => {
-          let s = item[btn.controlField] + ''
+          let s = item[btn.controlField] !== undefined ? item[btn.controlField] + '' : ''
           if (s === btn.controlVal || (btn.controlVal && btn.controlVal.split(',').includes(s))) {
             disabled = true
           }
@@ -184,7 +184,7 @@
       // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁
       notification.warning({
         top: 92,
-        message: this.state.dict['main.action.confirm.selectSingleLine'],
+        message: data.length === 0 ? '璇烽�夋嫨琛岋紒' : '璇烽�夋嫨鍗曡鏁版嵁锛�',
         duration: 5
       })
       return
@@ -350,12 +350,13 @@
           className={'mk-btn mk-' + btn.class}
           icon={btn.icon}
           disabled={disabled}
+          title={disabled ? (btn.reason || '') : ''}
           onClick={() => {this.actionTrigger()}}
           loading={loading}
         >{btn.label}</Button> : null}
         {show !== 'actionList' ? <Button
           type="link"
-          title={show === 'icon' ? btn.label : ''}
+          title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')}
           loading={loading}
           disabled={disabled}
           style={btn.style}

--
Gitblit v1.8.0