From e0cac33690a8bfdff2102d03a106c44c36df8ba1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 18 二月 2022 16:26:28 +0800
Subject: [PATCH] 2022-02-18

---
 src/mob/components/tabs/antv-tabs/index.jsx             |    8 ++--
 src/mob/components/tabs/antv-tabs/options.jsx           |   34 +++++++++--------
 src/tabviews/custom/components/tabs/antv-tabs/index.jsx |    2 
 src/menu/components/tabs/antv-tabs/index.jsx            |    8 ++--
 src/menu/components/tabs/antv-tabs/options.jsx          |   21 +++++-----
 5 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/src/menu/components/tabs/antv-tabs/index.jsx b/src/menu/components/tabs/antv-tabs/index.jsx
index 222738c..a6feb86 100644
--- a/src/menu/components/tabs/antv-tabs/index.jsx
+++ b/src/menu/components/tabs/antv-tabs/index.jsx
@@ -362,12 +362,12 @@
 
     return (
       <div className={'menu-tabs-edit-box ' + (tabs.setting.display || '')} style={_style} onClick={this.clickComponent} id={tabs.uuid}>
-        <DraggableTabs defaultActiveKey={defaultActiveKey} tabPosition={tabs.setting.position} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch} onChange={this.onChange}>
+        <DraggableTabs defaultActiveKey={defaultActiveKey} tabBarStyle={{background: tabs.setting.backgroundColor || 'transparent'}} tabPosition={tabs.setting.position} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch} onChange={this.onChange}>
           {tabs.subtabs.map(tab => (
             <TabPane tab={
               <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
                 <div className="mk-popover-control">
-                  <NormalForm title="鏍囩缂栬緫" width={600} update={this.updateTab} getForms={() => this.getTabForms(tab)}>
+                  <NormalForm title="鏍囩缂栬緫" width={800} update={this.updateTab} getForms={() => this.getTabForms(tab)}>
                     <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
                   </NormalForm>
                   <PasteComponent Tab={tab} insert={this.insert} />
@@ -385,10 +385,10 @@
         </DraggableTabs>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <NormalForm title="娣诲姞鏍囩" width={600} update={this.updateTab} getForms={() => this.getTabForms()}>
+            <NormalForm title="娣诲姞鏍囩" width={800} update={this.updateTab} getForms={() => this.getTabForms()}>
               <PlusOutlined className="plus" title="娣诲姞鏍囩"/>
             </NormalForm>
-            <NormalForm title="鏍囩椤佃缃�" width={700} update={this.updateTabs} getForms={this.getTabsForms}>
+            <NormalForm title="鏍囩椤佃缃�" width={800} update={this.updateTabs} getForms={this.getTabsForms}>
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="tabs" card={tabs}/>
diff --git a/src/menu/components/tabs/antv-tabs/options.jsx b/src/menu/components/tabs/antv-tabs/options.jsx
index 8bfc2a9..41fa966 100644
--- a/src/menu/components/tabs/antv-tabs/options.jsx
+++ b/src/menu/components/tabs/antv-tabs/options.jsx
@@ -25,7 +25,6 @@
       initval: tab.label || '',
       required: true,
       focus: true,
-      span: 22
     },
     {
       type: 'mkicon',
@@ -34,7 +33,6 @@
       initval: tab.icon || '',
       required: false,
       allowClear: true,
-      span: 22
     },
     // {
     //   type: 'radio',
@@ -56,16 +54,14 @@
       initval: tab.controlVal || '',
       tooltip: '褰撶鐢ㄥ瓧娈靛�间笌闅愯棌鏍囪鐩哥瓑鏃讹紝鏍囩椤典細闅愯棌銆�',
       required: false,
-      forbid: appType === 'mob',
-      span: 22
+      // forbid: appType === 'mob',
     },
     {
       type: 'color',
       field: 'backgroundColor',
-      label: '鑳屾櫙鑹�',
+      label: '鑳屾櫙(鍐呭鍖�)',
       initval: tab.backgroundColor || 'transparent',
       required: false,
-      span: 22
     },
     {
       type: 'radio',
@@ -77,7 +73,6 @@
         {value: 'false', label: '鍚�'},
         {value: 'true', label: '鏄�'},
       ],
-      span: 22
     },
     {
       type: 'multiselect',
@@ -87,7 +82,6 @@
       required: false,
       options: roleList,
       forbid: !!appType,
-      span: 22
     },
   ]
 
@@ -210,7 +204,7 @@
       controlFields: [
         {field: 'controlField', notNull: true},
       ],
-      forbid: appType === 'mob',
+      // forbid: appType === 'mob',
     },
     {
       type: 'text',
@@ -219,7 +213,14 @@
       initval: setting.controlField || '',
       tooltip: '鐢ㄤ簬鎺у埗鏍囩闅愯棌鐨勫瓧娈碉紝鍦ㄦ爣绛句腑濉叆闅愯棌鏍囪銆�',
       required: true,
-      forbid: appType === 'mob',
+      // forbid: appType === 'mob',
+    },
+    {
+      type: 'color',
+      field: 'backgroundColor',
+      label: '鑳屾櫙(鏍囬鏍�)',
+      initval: setting.backgroundColor || 'transparent',
+      required: false
     },
     {
       type: 'multiselect',
diff --git a/src/mob/components/tabs/antv-tabs/index.jsx b/src/mob/components/tabs/antv-tabs/index.jsx
index d79a4b2..bbf91c2 100644
--- a/src/mob/components/tabs/antv-tabs/index.jsx
+++ b/src/mob/components/tabs/antv-tabs/index.jsx
@@ -392,12 +392,12 @@
 
     return (
       <div className={'mob-tabs-edit-box ' + tabs.setting.display} style={_style} onClick={this.clickComponent} id={tabs.uuid}>
-        <DraggableTabs defaultActiveKey={defaultActiveKey} tabPosition={'top'} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch} onChange={this.onChange}>
+        <DraggableTabs defaultActiveKey={defaultActiveKey} tabBarStyle={{background: tabs.setting.backgroundColor || 'transparent'}} tabPosition={'top'} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch} onChange={this.onChange}>
           {tabs.subtabs.map(tab => (
             <TabPane tab={
               <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
                 <div className="mk-popover-control">
-                  <NormalForm title="鏍囩缂栬緫" width={600} update={this.updateTab} getForms={() => this.getTabForms(tab)}>
+                  <NormalForm title="鏍囩缂栬緫" width={800} update={this.updateTab} getForms={() => this.getTabForms(tab)}>
                     <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
                   </NormalForm>
                   <PasteComponent Tab={tab} insert={this.insert} />
@@ -416,10 +416,10 @@
         </DraggableTabs>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            <NormalForm title="娣诲姞鏍囩" width={600} update={this.updateTab} getForms={() => this.getTabForms()}>
+            <NormalForm title="娣诲姞鏍囩" width={800} update={this.updateTab} getForms={() => this.getTabForms()}>
               <PlusOutlined className="plus" title="娣诲姞鏍囩"/>
             </NormalForm>
-            <NormalForm title="鏍囩椤佃缃�" width={700} update={this.updateTabs} getForms={this.getTabsForms}>
+            <NormalForm title="鏍囩椤佃缃�" width={800} update={this.updateTabs} getForms={this.getTabsForms}>
               <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/>
             </NormalForm>
             <CopyComponent type="tabs" card={tabs}/>
diff --git a/src/mob/components/tabs/antv-tabs/options.jsx b/src/mob/components/tabs/antv-tabs/options.jsx
index 55a57be..e0a28ca 100644
--- a/src/mob/components/tabs/antv-tabs/options.jsx
+++ b/src/mob/components/tabs/antv-tabs/options.jsx
@@ -2,7 +2,7 @@
  * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
  */
 export function getTabForm(tab, setting) {
-  let appType = sessionStorage.getItem('appType')
+  // let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
 
   if (roleList) {
@@ -23,7 +23,6 @@
       initval: tab.label || '',
       required: true,
       focus: true,
-      span: 22
     },
     {
       type: 'mkicon',
@@ -32,7 +31,6 @@
       initval: tab.icon || '',
       required: false,
       allowClear: true,
-      span: 22
     },
     // {
     //   type: 'radio',
@@ -50,10 +48,9 @@
     {
       type: 'color',
       field: 'backgroundColor',
-      label: '鑳屾櫙鑹�',
+      label: '鑳屾櫙(鍐呭鍖�)',
       initval: tab.backgroundColor || 'transparent',
       required: false,
-      span: 22
     },
     {
       type: 'radio',
@@ -65,18 +62,16 @@
         {value: 'false', label: '鍚�'},
         {value: 'true', label: '鏄�'},
       ],
-      span: 22
     },
-    {
-      type: 'multiselect',
-      field: 'blacklist',
-      label: '榛戝悕鍗�',
-      initval: tab.blacklist || [],
-      required: false,
-      options: roleList,
-      forbid: !!appType,
-      span: 22
-    },
+    // {
+    //   type: 'multiselect',
+    //   field: 'blacklist',
+    //   label: '榛戝悕鍗�',
+    //   initval: tab.blacklist || [],
+    //   required: false,
+    //   options: roleList,
+    //   forbid: !!appType,
+    // },
   ]
 
   return tabForm
@@ -132,6 +127,13 @@
         {value: 'flex', label: '寮规�у竷灞�'},
         {value: 'inline-block', label: '瀹氬'},
       ],
+    },
+    {
+      type: 'color',
+      field: 'backgroundColor',
+      label: '鑳屾櫙(鏍囬鏍�)',
+      initval: setting.backgroundColor || 'transparent',
+      required: false
     }
   ]
 
diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx
index 0476bf0..1d5ac6a 100644
--- a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx
+++ b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx
@@ -121,7 +121,7 @@
 
     return (
       <div className={'menu-antv-tabs-wrap ' + tabs.setting.tabLabel} style={tabs.style}>
-        <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}>
+        <Tabs defaultActiveKey="1" tabBarStyle={{background: tabs.setting.backgroundColor || 'transparent'}} tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}>
           {tabs.subtabs.map(tab => (
             <TabPane tab={<span id={'tab' + tab.uuid}>{tab.icon ? <MkIcon type={tab.icon} /> : null}{tab.label}</span>} style={{backgroundColor: tab.backgroundColor || 'transparent'}} key={tab.uuid}>
               <TabTransfer BID={BID} config={tab} bids={bids} mainSearch={mainSearch}/>

--
Gitblit v1.8.0