king
2022-04-15 21d92eff0e23974d76e3e5a79ba50e3fc1c0b879
src/mob/components/menubar/normal-menubar/options.jsx
@@ -2,18 +2,6 @@
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
      roleList = []
    }
  } else {
    roleList = []
  }
  const menuWrapForm = [
    {
      type: 'text',
@@ -42,12 +30,50 @@
      required: true
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
      initval: wrap.blacklist || [],
      type: 'radio',
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'static',
      tooltip: '选择静态值,无需配置数据源。',
      required: false,
      options: roleList
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ]
    },
    {
      type: 'radio',
      field: 'layout',
      label: '菜单布局',
      initval: wrap.layout || 'grid',
      required: false,
      options: [
        {value: 'grid', label: '栅格布局'},
        {value: 'vertical', label: '上下布局'},
      ]
    },
    {
      type: 'radio',
      field: 'common',
      label: '常用',
      initval: wrap.common || 'true',
      tooltip: '当前菜单组中的菜单是否可添加至常用菜单组。',
      required: false,
      options: [
        {value: 'true', label: '可添加'},
        {value: 'false', label: '不可添加'},
      ]
    },
    {
      type: 'radio',
      field: 'permission',
      label: '权限验证',
      initval: wrap.permission || 'false',
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ]
    },
  ]