| | |
| | | */ |
| | | 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 { |
| | |
| | | required: false, |
| | | options: [ |
| | | {value: 'navbar', label: '导航栏'}, |
| | | {value: 'search', label: '搜索框'}, |
| | | {value: 'searchIcon', label: '搜索标'}, |
| | | {value: 'search', label: '搜索框', disabled: !searchable}, |
| | | {value: 'searchIcon', label: '搜索标', disabled: !searchable}, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | 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', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'linkmenu', |
| | | label: '关联菜单', |
| | | initval: wrap.linkmenu || '', |
| | | tooltip: '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。', |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'reload', |
| | | label: '返回后', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | 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: '自定义菜单', |