From fe21d23b147ed5cec22b4f76a88840b05495d4ad Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 六月 2022 22:33:59 +0800
Subject: [PATCH] 2022-06-18

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index c5efa4a..296ae6e 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -861,7 +861,7 @@
           _resolve()
         })
       } else { // 瓒呭嚭20涓姹傛椂寰幆鎵ц
-        if (btn.progress === 'progressbar') {
+        if (btn.progress === 'progressbar' && btn.$toolbtn) {
           this.setState({
             loadingTotal: params.length
           })
@@ -926,7 +926,7 @@
         })
       }
 
-      if (_params.length > 1 && btn.progress === 'progressbar') {
+      if (_params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
         this.setState({
           loadingTotal: _params.length
         })
@@ -947,7 +947,7 @@
         params = this.getInnerParam(data, formdata)
       }
 
-      if (params.length > 1 && btn.progress === 'progressbar') {
+      if (params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
         this.setState({
           loadingTotal: params.length
         })
@@ -1538,6 +1538,9 @@
     if (btn.output) {
       id = res.mk_b_id || res[btn.output] || ''
     }
+    if (res.mk_icon) {
+      sessionStorage.setItem('avatar', res.mk_icon)
+    }
     let tabId = ''
     if (btn.refreshTab && btn.refreshTab.length > 0) {
       tabId = btn.refreshTab[btn.refreshTab.length - 1]
@@ -1554,9 +1557,9 @@
       MKEmitter.emit('popclose')
     } else if (btn.execSuccess !== 'never') {
       MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id, this.state.selines)
-    } else {
-      btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId)
     }
+    
+    btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId)
 
     if (tabId) {
       MKEmitter.emit('reloadMenuView', tabId, 'table')
@@ -1573,7 +1576,7 @@
       node && node.scrollIntoView({behavior: 'smooth', block: 'center', inline: 'nearest'})
     }
 
-    if (btn.openmenu && btn.openmenu.length > 0 && btn.MenuID) {
+    if (btn.MenuID && Array.isArray(btn.openmenu) && btn.openmenu.length > 0) {
       let newtab = {
         MenuID: btn.MenuID,
         MenuName: btn.MenuName,
@@ -2026,7 +2029,7 @@
 
     if (!btnconfig || !btnconfig.setting) return null
 
-    let title = btnconfig.setting.title
+    let title = btn.label
     let width = btnconfig.setting.width > 100 ? btnconfig.setting.width : btnconfig.setting.width + 'vw'
     let clickouter = btnconfig.setting.clickouter === 'close'
 
@@ -2140,10 +2143,14 @@
     } else {
       type = ''
       icon = btn.icon || ''
-      label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label
+      label = btn.label
       className = 'mk-btn mk-' + btn.class
     }
 
+    if (loadingNumber && !loadingTotal && btn.$toolbtn && (!btn.show || btn.show === 'button')) {
+      label = (loadingNumber && !loadingTotal ? `(${loadingNumber})` : '') + btn.label
+    }
+
     return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
       <Button
         type={type}

--
Gitblit v1.8.0