king
2021-07-29 9e39c53e5cec0f5a98a2d805aeda7c2d87060633
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Button, notification } from 'antd'
import { Button, notification, Icon } from 'antd'
import { modifyTabview } from '@/store/action'
import zhCN from '@/locales/zh-CN/main.js'
@@ -194,15 +194,30 @@
        >{btn.label}</Button>
      )
    } else { // icon、text、 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 || ''
      } else if (show === 'text') {
        label = btn.label
      }
      return (
        <Button
          type="link"
          title={show === 'icon' ? btn.label : ''}
          style={btn.style}
          disabled={disabled}
          icon={show === 'text' ? '' : (btn.icon || '')}
          icon={icon}
          onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
        >{label}</Button>
      )
    }
  }