From 9e39c53e5cec0f5a98a2d805aeda7c2d87060633 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 29 七月 2021 15:18:12 +0800 Subject: [PATCH] 2021-07-29 --- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 2bd9686..127a679 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/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 * as XLSX from 'xlsx' import Utils from '@/utils/utils.js' @@ -870,15 +870,30 @@ >{btn.label}</Button> ) } 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 type={btn.icon}/> : ''}</span> + icon = '' + } else if (show === 'icon') { + icon = btn.icon || 'download' + } else if (show === 'text') { + label = btn.label + } + return ( <Button type="link" title={show === 'icon' ? btn.label : ''} loading={loading} style={btn.style} - icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'download') : (btn.icon || ''))} + icon={icon} onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} - >{show === 'icon' ? '' : btn.label}</Button> + >{label}</Button> ) } } -- Gitblit v1.8.0