king
2021-12-18 b223552a0c4bc787ad251add025a93d77527ffbe
src/mob/components/tabs/antv-tabs/options.jsx
@@ -34,19 +34,19 @@
      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',
    //   required: false,
    //   options: [
    //     {value: 'false', label: '无'},
    //     {value: 'icon', label: '有'},
    //   ],
    //   forbid: appType !== 'mob' || setting.display !== 'inline-block',
    //   span: 22
    // },
    {
      type: 'multiselect',
      field: 'blacklist',
@@ -66,19 +66,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 +86,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: '标签位置为top时有效,默认值为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 +112,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