king
2022-03-29 b6cbfb08b51e87e6eac995be8e7751815715e6a1
src/mob/components/topbar/normal-navbar/options.jsx
@@ -6,6 +6,12 @@
 */
export default function (wrap) {
  let menulist = sessionStorage.getItem('appMenus')
  let searchable = true
  window.GLOB.customMenu.components.forEach(item => {
    if (item.type === 'search') {
      searchable = false
    }
  })
  if (menulist) {
    try {
@@ -26,8 +32,8 @@
      required: false,
      options: [
        {value: 'navbar', label: '导航栏'},
        {value: 'search', label: '搜索框'},
        {value: 'searchIcon', label: '搜索标'},
        {value: 'search', label: '搜索框', disabled: !searchable},
        {value: 'searchIcon', label: '搜索标', disabled: !searchable},
      ],
    },
    {
@@ -37,6 +43,21 @@
      initval: wrap.title || '',
      tooltip: '使用搜索框时,标题用于搜索条件隐藏时(当启用黑名单,登录用户无权限时)显示。',
      required: false
    },
    {
      type: 'radio',
      field: 'menuPosition',
      label: '菜单位置',
      initval: wrap.menuPosition || 'right',
      tooltip: '自定义菜单的位置。',
      required: false,
      options: [
        {value: 'left', label: '左侧'},
        {value: 'right', label: '右侧'},
      ],
      controlFields: [
        {field: 'back', values: ['right']},
      ]
    },
    {
      type: 'radio',
@@ -102,15 +123,6 @@
      ]
    },
    {
      type: 'select',
      field: 'linkmenu',
      label: '关联菜单',
      initval: wrap.linkmenu || '',
      tooltip: '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。',
      required: false,
      options: menulist
    },
    {
      type: 'radio',
      field: 'reload',
      label: '返回后',
@@ -126,6 +138,26 @@
      }]
    },
    {
      type: 'radio',
      field: 'mode',
      label: '弹框背景',
      initval: wrap.mode || 'dark',
      required: false,
      options: [
        {value: 'light', label: '白色'},
        {value: 'dark', label: '黑色'},
      ]
    },
    {
      type: 'select',
      field: 'linkmenu',
      label: '关联菜单',
      initval: wrap.linkmenu || '',
      tooltip: '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。',
      required: false,
      options: menulist
    },
    {
      type: 'table',
      field: 'menus',
      label: '自定义菜单',