From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 09 二月 2022 11:48:29 +0800
Subject: [PATCH] 2022-02-09

---
 src/mob/components/tabs/antv-tabs/options.jsx |   96 +++++++++++++++++-------------------------------
 1 files changed, 34 insertions(+), 62 deletions(-)

diff --git a/src/mob/components/tabs/antv-tabs/options.jsx b/src/mob/components/tabs/antv-tabs/options.jsx
index 5d4291a..1b32739 100644
--- a/src/mob/components/tabs/antv-tabs/options.jsx
+++ b/src/mob/components/tabs/antv-tabs/options.jsx
@@ -34,17 +34,25 @@
       allowClear: true,
       span: 22
     },
+    // {
+    //   type: 'radio',
+    //   field: 'hasSearch',
+    //   label: '鎼滅储',
+    //   initval: tab.hasSearch || 'false',
+    //   required: false,
+    //   options: [
+    //     {value: 'false', label: '鏃�'},
+    //     {value: 'icon', label: '鏈�'},
+    //   ],
+    //   forbid: appType !== 'mob' || setting.display !== 'inline-block',
+    //   span: 22
+    // },
     {
-      type: 'radio',
-      field: 'hasSearch',
-      label: '鎼滅储',
-      initval: tab.hasSearch || 'false',
+      type: 'color',
+      field: 'backgroundColor',
+      label: '鑳屾櫙鑹�',
+      initval: tab.backgroundColor || 'transparent',
       required: false,
-      options: [
-        {value: 'false', label: '鏃�'},
-        {value: 'icon', label: '鏈�'},
-      ],
-      forbid: appType !== 'mob' || setting.position !== 'top' || setting.display !== 'inline-block',
       span: 22
     },
     {
@@ -66,19 +74,6 @@
  * @description tabs琛ㄥ崟閰嶇疆淇℃伅
  */
 export function getTabsSetForm(setting) {
-  let appType = sessionStorage.getItem('appType')
-  let roleList = sessionStorage.getItem('sysRoles')
-
-  if (roleList) {
-    try {
-      roleList = JSON.parse(roleList)
-    } catch (e) {
-      roleList = []
-    }
-  } else {
-    roleList = []
-  }
-
   const tabForm = [
     {
       type: 'text',
@@ -99,35 +94,22 @@
       precision: 0,
       required: true
     },
-    {
-      type: 'select',
-      field: 'position',
-      label: '鏍囩浣嶇疆',
-      initval: setting.position || 'top',
-      required: true,
-      options: [
-        {value: 'top', label: 'top'},
-        {value: 'bottom', label: 'bottom'},
-        {value: 'left', label: 'left'},
-        {value: 'right', label: 'right'},
-      ],
-      controlFields: [
-        {field: 'display', values: ['top', 'bottom']},
-      ]
-    },
-    {
-      type: 'radio',
-      field: 'tabStyle',
-      label: '椤电鏍峰紡',
-      initval: setting.tabStyle || 'line',
-      tooltip: '鏍囩浣嶇疆涓簍op鏃舵湁鏁堬紝榛樿鍊间负line銆�',
-      required: true,
-      options: [
-        {value: 'line', label: 'line'},
-        {value: 'card', label: 'card'},
-      ],
-      forbid: appType === 'mob'
-    },
+    // {
+    //   type: 'select',
+    //   field: 'position',
+    //   label: '鏍囩浣嶇疆',
+    //   initval: setting.position || 'top',
+    //   required: true,
+    //   options: [
+    //     {value: 'top', label: 'top'},
+    //     {value: 'bottom', label: 'bottom'},
+    //     {value: 'left', label: 'left'},
+    //     {value: 'right', label: 'right'},
+    //   ],
+    //   controlFields: [
+    //     {field: 'display', values: ['top', 'bottom']},
+    //   ]
+    // },
     {
       type: 'radio',
       field: 'display',
@@ -138,17 +120,7 @@
         {value: 'flex', label: '寮规�у竷灞�'},
         {value: 'inline-block', label: '瀹氬'},
       ],
-      forbid: appType !== 'mob'
-    },
-    {
-      type: 'multiselect',
-      field: 'blacklist',
-      label: '榛戝悕鍗�',
-      initval: setting.blacklist || [],
-      required: false,
-      options: roleList,
-      forbid: !!appType
-    },
+    }
   ]
 
   return tabForm

--
Gitblit v1.8.0