From 72419e2f826031a158173f46d723a672064e37cd Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 31 八月 2021 22:42:51 +0800
Subject: [PATCH] 2021-08-31

---
 src/tabviews/zshare/actionList/excelInbutton/index.jsx |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
index 2fc88ba..e943949 100644
--- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -3,7 +3,7 @@
 import moment from 'moment'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification, message } from 'antd'
+import { Button, Modal, notification, message, Icon } from 'antd'
 
 import ExcelIn from './excelin'
 import Utils, { getExcelInSql } from '@/utils/utils.js'
@@ -456,6 +456,22 @@
         <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
       </div>
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || 'upload'
+      // } else if (show === 'text') {
+      } else {
+        label = btn.label
+      }
+
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
@@ -463,9 +479,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style}
-          icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'upload') : (btn.icon || ''))}
+          icon={icon}
           onClick={() => {this.actionTrigger()}}
-        >{show === 'icon' ? '' : btn.label}</Button>
+        >{label}</Button>
         <ExcelIn btn={btn} triggerExcelIn={() => this.updateStatus('start')} returndata={this.getexceldata} ref="excelIn" />
       </div>
     }

--
Gitblit v1.8.0