路由兜底

This commit is contained in:
2026-06-06 15:30:09 +08:00
parent 5363613a7d
commit 495fde42ca
2 changed files with 38 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { RouteRecordRaw } from 'vue-router';
import { RouteRecordRaw } from 'vue-router';
/**
* 路由meta对象参数说明
@@ -69,9 +69,9 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
/**
* 盘点管理路由配置(供后端菜单配置参考)
*
*
* 父级菜单: 库存作业 (/assets/operation)
*
*
* 盘点菜单配置:
* - 路由路径: /assets/operation/count
* - 组件路径: assets/operation/count/index
@@ -1077,8 +1077,8 @@ export const demoRoutes: Array<RouteRecordRaw> = [
*/
export const notFoundAndNoPower = [
{
path: '/:path(.*)*',
name: 'notFound',
path: '/404',
name: 'notFoundPage',
component: () => import('/@/views/error/404.vue'),
meta: {
title: 'message.staticRoutes.notFound',
@@ -1094,6 +1094,15 @@ export const notFoundAndNoPower = [
isHide: true,
},
},
{
path: '/:path(.*)*',
name: 'notFound',
redirect: '/404',
meta: {
title: 'message.staticRoutes.notFound',
isHide: true,
},
},
];
/**