From f0bf8c399c354c22227f8f1a76ed806098db59c0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 21 五月 2024 16:51:02 +0800
Subject: [PATCH] 2024-05-21

---
 src/tabviews/zshare/actionList/changeuserbutton/index.jsx |   34 +++++++++-------------------------
 1 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
index d70ca80..a85c8a0 100644
--- a/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/changeuserbutton/index.jsx
@@ -102,12 +102,13 @@
   /**
    * @description 瑙﹀彂鎸夐挳鎿嶄綔
    */
-  actionTrigger = (triggerId, record, type) => {
-    const { setting, selectedData, btn, MenuID } = this.props
+  actionTrigger = (triggerId, record, type, lid) => {
+    const { setting, selectedData, btn, MenuID, LID } = this.props
     const { loading, disabled } = this.state
     
     if (loading || disabled) return
     if (triggerId && btn.uuid !== triggerId) return
+    if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return
 
     if (btn.funcType === 'closetab') {
       MKEmitter.emit('closeTabView', MenuID || btn.$MenuID)
@@ -115,8 +116,6 @@
       if (btn.refreshTab && btn.refreshTab.length > 0) {
         MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table')
       }
-      return
-    } else if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) {
       return
     }
     
@@ -228,38 +227,23 @@
     if (hidden) return null
 
     let label = ''
-    let icon = ''
-    let type = 'link'
-    let className = ''
 
-    if (btn.show === 'button') {
-      label = btn.label
-      icon = btn.icon || ''
-    } else if (btn.show === 'link') {
-      label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
-      icon = ''
+    if (btn.show === 'link') {
+      label = <span>{btn.label}{btn.icon ? <MkIcon style={{marginLeft: '8px'}} type={btn.icon} /> : ''}</span>
     } else if (btn.show === 'icon') {
-      icon = btn.icon || ''
-    } else if (!btn.$toolbtn) {
-      icon = btn.icon || ''
-      label = btn.label
-      className = 'mk-btn mk-' + btn.class
+      label = !loading ? <MkIcon type={btn.icon} /> : null
     } else {
-      type = ''
-      icon = btn.icon || ''
-      label = btn.label
-      className = 'mk-btn mk-' + btn.class
+      label = <span>{!loading && btn.icon ? <MkIcon style={{marginRight: '8px'}} type={btn.icon} /> : ''}{btn.label}</span>
     }
 
     return (
       <Button
-        type={type}
+        type="link"
         title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
         loading={loading}
         disabled={disabled}
         style={btn.style}
-        icon={icon}
-        className={className}
+        className={btn.hover || ''}
         onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
       >{label}</Button>
     )

--
Gitblit v1.8.0