From 21d92eff0e23974d76e3e5a79ba50e3fc1c0b879 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 四月 2022 01:08:15 +0800
Subject: [PATCH] 2022-04-15

---
 src/menu/components/tabs/antv-tabs/options.jsx |   92 ++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 81 insertions(+), 11 deletions(-)

diff --git a/src/menu/components/tabs/antv-tabs/options.jsx b/src/menu/components/tabs/antv-tabs/options.jsx
index 23f7108..c0430ab 100644
--- a/src/menu/components/tabs/antv-tabs/options.jsx
+++ b/src/menu/components/tabs/antv-tabs/options.jsx
@@ -1,3 +1,5 @@
+import MenuUtils from '@/utils/utils-custom.js'
+
 /**
  * @description tab琛ㄥ崟閰嶇疆淇℃伅
  */
@@ -23,7 +25,6 @@
       initval: tab.label || '',
       required: true,
       focus: true,
-      span: 22
     },
     {
       type: 'mkicon',
@@ -32,20 +33,46 @@
       initval: tab.icon || '',
       required: false,
       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.position !== 'top' || setting.display !== 'inline-block',
+    //   span: 22
+    // },
+    {
+      type: 'text',
+      field: 'controlVal',
+      label: '闅愯棌鏍囪',
+      initval: tab.controlVal || '',
+      tooltip: '褰撶鐢ㄥ瓧娈靛�间笌闅愯棌鏍囪鐩哥瓑鏃讹紝鏍囩椤典細闅愯棌銆�',
+      required: false,
+      // forbid: appType === 'mob',
+    },
+    {
+      type: 'color',
+      field: 'backgroundColor',
+      label: '鑳屾櫙(鍐呭鍖�)',
+      initval: tab.backgroundColor || 'transparent',
+      required: false,
     },
     {
       type: 'radio',
-      field: 'hasSearch',
-      label: '鎼滅储',
-      initval: tab.hasSearch || 'false',
+      field: 'hide',
+      label: '闅愯棌',
+      initval: tab.hide || 'false',
       required: false,
       options: [
-        {value: 'false', label: '鏃�'},
-        {value: 'icon', label: '鏈�'},
+        {value: 'false', label: '鍚�'},
+        {value: 'true', label: '鏄�'},
       ],
-      forbid: appType !== 'mob' || setting.position !== 'top' || setting.display !== 'inline-block',
-      span: 22
     },
     {
       type: 'multiselect',
@@ -55,7 +82,6 @@
       required: false,
       options: roleList,
       forbid: !!appType,
-      span: 22
     },
   ]
 
@@ -65,9 +91,11 @@
 /**
  * @description tabs琛ㄥ崟閰嶇疆淇℃伅
  */
-export function getTabsSetForm(setting) {
+export function getTabsSetForm(setting, uuid) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
+
+  let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, uuid) || []
 
   if (roleList) {
     try {
@@ -165,6 +193,48 @@
       ]
     },
     {
+      type: 'cascader',
+      field: 'supModule',
+      label: '涓婄骇缁勪欢',
+      initval: setting.supModule || [],
+      tooltip: '鏍囩缁勫彲浠ラ�夋嫨涓婄骇缁勪欢锛屽~鍏ョ鐢ㄥ瓧娈碉紝鐢ㄤ簬鎺у埗鏍囩闅愯棌銆�',
+      required: false,
+      allowClear: true,
+      options: modules,
+      controlFields: [
+        {field: 'controlField', notNull: true},
+      ],
+      // forbid: appType === 'mob',
+    },
+    {
+      type: 'text',
+      field: 'controlField',
+      label: '绂佺敤瀛楁',
+      initval: setting.controlField || '',
+      tooltip: '鐢ㄤ簬鎺у埗鏍囩闅愯棌鐨勫瓧娈碉紝鍦ㄦ爣绛句腑濉叆闅愯棌鏍囪銆�',
+      required: true,
+      // forbid: appType === 'mob',
+    },
+    {
+      type: 'color',
+      field: 'backgroundColor',
+      label: '鑳屾櫙(鏍囬鏍�)',
+      initval: setting.backgroundColor || 'transparent',
+      required: false
+    },
+    {
+      type: 'radio',
+      field: 'permission',
+      label: '鏉冮檺楠岃瘉',
+      initval: setting.permission || 'false',
+      required: false,
+      options: [
+        {value: 'true', label: '鍚敤'},
+        {value: 'false', label: '绂佺敤'},
+      ],
+      forbid: !appType
+    },
+    {
       type: 'multiselect',
       field: 'blacklist',
       label: '榛戝悕鍗�',

--
Gitblit v1.8.0