feat: 产品菜单路由权限

This commit is contained in:
rd
2025-07-08 16:55:04 +08:00
parent ead209da4d
commit f87e5ff020
26 changed files with 263 additions and 102 deletions

View File

@ -1,28 +1,35 @@
import type { RouteRecordRaw } from 'vue-router';
import { REDIRECT_ROUTE_NAME } from '@/router/constants';
export const REDIRECT_MAIN: RouteRecordRaw = {
path: '/redirect',
name: 'redirect',
meta: {
requiresAuth: true,
hideInMenu: true,
},
children: [
{
path: '/redirect/:path',
name: REDIRECT_ROUTE_NAME,
component: () => import('@/layouts/Basic.vue'),
meta: {
requiresAuth: true,
hideInMenu: true,
},
},
],
};
// export const REDIRECT_MAIN: RouteRecordRaw = {
// path: '/redirect',
// name: 'redirect',
// meta: {
// requiresAuth: false,
// requireLogin: false,
// hideInMenu: true,
// },
// children: [
// {
// path: '/redirect/:path',
// name: REDIRECT_ROUTE_NAME,
// component: () => import('@/layouts/Basic.vue'),
// meta: {
// requiresAuth: false,
// requireLogin: false,
// hideInMenu: true,
// },
// },
// ],
// };
export const NOT_FOUND_ROUTE: RouteRecordRaw = {
path: '/:pathMatch(.*)*',
name: 'notFound',
component: () => import('@/layouts/NotFound.vue'),
meta: {
requiresAuth: false,
hideInMenu: true,
hideSidebar: true,
},
};