chore: 修改本地路由写法(新版)/新增本地菜单图标
This commit is contained in:
parent
bef98489b1
commit
dcd633bb39
@ -5,160 +5,76 @@ import { $t } from '@vben/locales';
|
||||
/**
|
||||
* 该文件放非后台返回的路由 比如个人中心 等需要跳转显示的页面
|
||||
*/
|
||||
|
||||
/**
|
||||
* 个人中心
|
||||
*/
|
||||
const profileRoute: RouteRecordStringComponent[] = [
|
||||
const localRoutes: RouteRecordStringComponent[] = [
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: '/_core/profile/index',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
hideInMenu: true,
|
||||
icon: 'mingcute:profile-line',
|
||||
title: $t('ui.widgets.profile'),
|
||||
hideInMenu: true,
|
||||
},
|
||||
name: 'Profile',
|
||||
path: '/',
|
||||
redirect: '/profile',
|
||||
children: [
|
||||
{
|
||||
component: '/_core/profile/index',
|
||||
meta: {
|
||||
icon: 'mingcute:profile-line',
|
||||
keepAlive: true,
|
||||
title: $t('ui.widgets.profile'),
|
||||
},
|
||||
name: 'ProfileIndex',
|
||||
path: '/profile',
|
||||
},
|
||||
],
|
||||
path: '/profile',
|
||||
},
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: '/system/oss-config/index',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
hideInMenu: true,
|
||||
activePath: '/system/oss',
|
||||
icon: 'ant-design:setting-outlined',
|
||||
title: 'oss配置',
|
||||
hideInMenu: true,
|
||||
},
|
||||
name: 'OssConfig',
|
||||
path: '/',
|
||||
redirect: '/system/oss-config',
|
||||
children: [
|
||||
{
|
||||
component: '/system/oss-config/index',
|
||||
meta: {
|
||||
activePath: '/system/oss',
|
||||
icon: 'ant-design:setting-outlined',
|
||||
keepAlive: true,
|
||||
title: 'oss配置',
|
||||
},
|
||||
name: 'OssConfigIndex',
|
||||
path: '/system/oss-config',
|
||||
},
|
||||
],
|
||||
path: '/system/oss-config',
|
||||
},
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: '/tool/gen/edit-gen',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
activePath: '/tool/gen',
|
||||
icon: 'tabler:code',
|
||||
title: '生成配置',
|
||||
hideInMenu: true,
|
||||
title: '修改生成配置',
|
||||
},
|
||||
name: 'GenConfig',
|
||||
path: '/',
|
||||
redirect: '/code-gen/edit',
|
||||
children: [
|
||||
{
|
||||
component: '/tool/gen/edit-gen',
|
||||
meta: {
|
||||
activePath: '/tool/gen',
|
||||
icon: 'tabler:code',
|
||||
keepAlive: true,
|
||||
title: '生成配置',
|
||||
},
|
||||
name: 'GenConfigIndex',
|
||||
path: '/code-gen/edit/:tableId',
|
||||
},
|
||||
],
|
||||
path: '/code-gen/edit/:tableId',
|
||||
},
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: '/system/role-assign/index',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
hideInMenu: true,
|
||||
activePath: '/system/role',
|
||||
icon: 'eos-icons:role-binding-outlined',
|
||||
title: '分配角色',
|
||||
hideInMenu: true,
|
||||
},
|
||||
name: 'RoleAssign',
|
||||
path: '/',
|
||||
redirect: '/system/role-assign',
|
||||
children: [
|
||||
{
|
||||
component: '/system/role-assign/index',
|
||||
meta: {
|
||||
activePath: '/system/role',
|
||||
icon: 'eos-icons:role-binding-outlined',
|
||||
keepAlive: true,
|
||||
title: '分配角色',
|
||||
},
|
||||
name: 'RoleAssignIndex',
|
||||
path: '/system/role-assign/:roleId',
|
||||
},
|
||||
],
|
||||
path: '/system/role-assign/:roleId',
|
||||
},
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: '/workflow/components/flow-designer',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
hideInMenu: true,
|
||||
activePath: '/workflow/processDefinition',
|
||||
icon: 'fluent-mdl2:flow',
|
||||
title: '流程设计',
|
||||
hideInMenu: true,
|
||||
},
|
||||
name: 'WorkflowDesigner',
|
||||
path: '/',
|
||||
redirect: '/workflow/designer',
|
||||
children: [
|
||||
{
|
||||
component: '/workflow/components/flow-designer',
|
||||
meta: {
|
||||
activePath: '/workflow/processDefinition',
|
||||
icon: 'eos-icons:role-binding-outlined',
|
||||
keepAlive: true,
|
||||
title: '流程设计',
|
||||
},
|
||||
name: 'WorkflowDesignerIndex',
|
||||
path: '/workflow/designer',
|
||||
},
|
||||
],
|
||||
path: '/workflow/designer',
|
||||
},
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: 'workflow/leave/leave-form',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
hideInMenu: true,
|
||||
icon: 'flat-color-icons:leave',
|
||||
title: '请假申请',
|
||||
activePath: '/demo/leave',
|
||||
hideInMenu: true,
|
||||
},
|
||||
name: 'WorkflowLeave',
|
||||
path: '/',
|
||||
redirect: '/workflow/leaveEdit/index',
|
||||
children: [
|
||||
{
|
||||
component: 'workflow/leave/leave-form',
|
||||
meta: {
|
||||
icon: 'eos-icons:role-binding-outlined',
|
||||
keepAlive: true,
|
||||
title: '请假申请',
|
||||
activePath: '/demo/leave',
|
||||
},
|
||||
name: 'WorkflowLeaveIndex',
|
||||
path: '/workflow/leaveEdit/index',
|
||||
},
|
||||
],
|
||||
name: 'WorkflowLeaveIndex',
|
||||
path: '/workflow/leaveEdit/index',
|
||||
},
|
||||
// 这里是iframe使用的 去掉外层的BasicLayout
|
||||
{
|
||||
component: 'workflow/leave/leave-form',
|
||||
meta: {
|
||||
icon: 'eos-icons:role-binding-outlined',
|
||||
keepAlive: true,
|
||||
title: '请假申请',
|
||||
hideInMenu: true,
|
||||
// 不使用基础布局(仅在顶级生效)
|
||||
@ -214,25 +130,14 @@ export const localMenuList: RouteRecordStringComponent[] = [
|
||||
],
|
||||
},
|
||||
{
|
||||
component: 'BasicLayout',
|
||||
component: '/_core/about/index',
|
||||
meta: {
|
||||
hideChildrenInMenu: true,
|
||||
icon: 'lucide:copyright',
|
||||
order: 9999,
|
||||
title: $t('demos.vben.about'),
|
||||
},
|
||||
name: 'About',
|
||||
path: '/about',
|
||||
children: [
|
||||
{
|
||||
component: '/_core/about/index',
|
||||
meta: {
|
||||
title: $t('demos.vben.about'),
|
||||
},
|
||||
name: 'VbenAbout',
|
||||
path: '/vben-admin/about',
|
||||
},
|
||||
],
|
||||
path: '/vben-admin/about',
|
||||
},
|
||||
...profileRoute,
|
||||
...localRoutes,
|
||||
];
|
||||
|
@ -14,11 +14,13 @@ import evergreenTree from '@iconify/icons-emojione/evergreen-tree';
|
||||
import RoleBindingOutlined from '@iconify/icons-eos-icons/role-binding-outlined';
|
||||
import SystemGroup from '@iconify/icons-eos-icons/system-group';
|
||||
import NoticePush from '@iconify/icons-fe/notice-push';
|
||||
import leave from '@iconify/icons-flat-color-icons/leave';
|
||||
import plus from '@iconify/icons-flat-color-icons/plus';
|
||||
import from24 from '@iconify/icons-fluent/form-24-regular';
|
||||
import builDefinition from '@iconify/icons-fluent-mdl2/build-definition';
|
||||
import Dictionary from '@iconify/icons-fluent-mdl2/dictionary';
|
||||
import flow from '@iconify/icons-fluent-mdl2/flow';
|
||||
import leaveUser from '@iconify/icons-fluent-mdl2/leave-user';
|
||||
import from24 from '@iconify/icons-fluent/form-24-regular';
|
||||
import BaseLineHouse from '@iconify/icons-ic/baseline-house';
|
||||
import monitor from '@iconify/icons-ic/baseline-monitor';
|
||||
import roundLaunch from '@iconify/icons-ic/round-launch';
|
||||
@ -100,3 +102,7 @@ addIcon('lucide:copyright', copyright);
|
||||
addIcon('mingcute:profile-line', profileLine);
|
||||
// oss配置
|
||||
addIcon('ant-design:setting-outlined', settingOutline);
|
||||
// 请假
|
||||
addIcon('flat-color-icons:leave', leave);
|
||||
// flow
|
||||
addIcon('fluent-mdl2:flow', flow);
|
||||
|
Loading…
Reference in New Issue
Block a user