From b6cbfb08b51e87e6eac995be8e7751815715e6a1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 29 三月 2022 15:36:21 +0800
Subject: [PATCH] 2022-03-29

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index de43359..23ace02 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2093,9 +2093,9 @@
 
     if (btn.OpenType === 'form') {
       if (btn.formType === 'switch') {
-        return <Switch loading={loading} checked={check} disabled={disabled || loading} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={style} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/>
+        return <Switch loading={loading} checked={check} disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} onChange={(val,e) => {e.stopPropagation();this.actionTrigger()}} style={style} size={btn.size} checkedChildren={btn.openText || ''} unCheckedChildren={btn.closeText || ''}/>
       } else {
-        return <Checkbox disabled={disabled || loading} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={style}></Checkbox>
+        return <Checkbox disabled={disabled || loading} title={disabled ? (btn.reason || '') : ''} checked={check} onChange={(e) => {e.stopPropagation();this.actionTrigger()}} style={style}></Checkbox>
       }
     } else if (show === 'actionList') {
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
@@ -2104,6 +2104,7 @@
           icon={btn.icon}
           loading={loading}
           disabled={disabled}
+          title={disabled ? (btn.reason || '') : ''}
           className={'mk-btn mk-' + btn.class}
           onClick={() => {this.actionTrigger()}}
         >{(loadingNumber ? `(${loadingNumber})` : '') + btn.label}</Button>
@@ -2139,7 +2140,7 @@
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
-          title={show === 'icon' ? btn.label : ''}
+          title={disabled ? (btn.reason || '') : (show === 'icon' ? btn.label : '')}
           loading={loading}
           disabled={disabled}
           style={btn.style || style}

--
Gitblit v1.8.0