From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 八月 2021 17:17:11 +0800
Subject: [PATCH] 2021-08-26

---
 src/tabviews/zshare/actionList/tabbutton/index.jsx |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index fdb9d78..db9b04b 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/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'
@@ -157,7 +157,7 @@
       return tab.MenuID !== newtab.MenuID
     })
 
-    if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) {
+    if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) {
       this.props.modifyTabview([newtab])
     } else {
       if (tabviews.length !== tabs.length) {
@@ -194,15 +194,31 @@
         >{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 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"
           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>
       )
     }
   }

--
Gitblit v1.8.0