king
2022-01-21 46f79b491173d284a4900d19e7aecf7509481438
src/menu/components/tabs/antv-tabs/options.jsx
@@ -1,3 +1,5 @@
import MenuUtils from '@/utils/utils-custom.js'
/**
 * @description tab表单配置信息
 */
@@ -34,17 +36,27 @@
      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: 'radio',
      field: 'hasSearch',
      label: '搜索',
      initval: tab.hasSearch || 'false',
      type: 'text',
      field: 'controlVal',
      label: '隐藏标记',
      initval: tab.controlVal || '',
      tooltip: '当禁用字段值与隐藏标记相等时,标签页会隐藏。',
      required: false,
      options: [
        {value: 'false', label: '无'},
        {value: 'icon', label: '有'},
      ],
      forbid: appType !== 'mob' || setting.position !== 'top' || setting.display !== 'inline-block',
      forbid: appType === 'mob',
      span: 22
    },
    {
@@ -65,9 +77,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 +179,29 @@
      ]
    },
    {
      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: 'multiselect',
      field: 'blacklist',
      label: '黑名单',