king
2021-08-26 e9c48bd7356462ba9257540b130a47a65ad1861d
src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, notification, Modal } from 'antd'
import { Button, notification, Modal, Icon } from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -162,6 +162,8 @@
              localStorage.setItem('localDataM', res.dataM ? 'true' : '')
              localStorage.setItem('debug', res.debug || '')
              localStorage.setItem('role_id', res.role_id || '')
              localStorage.setItem('departmentcode', res.departmentcode || '')
              localStorage.setItem('organization', res.organization || '')
              localStorage.setItem('localRole_id', res.role_id || '')
              
              sessionStorage.removeItem('CloudAvatar')
@@ -207,6 +209,22 @@
        >{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 style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
        icon = ''
      } else if (show === 'icon') {
        icon = btn.icon || ''
      // } else if (show === 'text') {
      } else {
        label = btn.label
      }
      return (
        <Button
          type="link"
@@ -214,9 +232,9 @@
          loading={loading}
          disabled={disabled}
          style={btn.style}
          icon={show === 'text' ? '' : (btn.icon || '')}
          icon={icon}
          onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
        >{label}</Button>
      )
    }
  }