feat: 回退页面完善

This commit is contained in:
vben
2024-06-08 20:14:04 +08:00
parent 7bcd7746ca
commit 1d6b1f4926
31 changed files with 791 additions and 201 deletions

View File

@@ -30,8 +30,8 @@ async function generatorMenus(
badgeVariants,
hideChildrenInMenu = false,
icon,
link,
order,
target,
title = '',
} = meta || {};
@@ -50,7 +50,7 @@ async function generatorMenus(
});
}
// 隐藏子菜单
const resultPath = hideChildrenInMenu ? redirect || path : target || path;
const resultPath = hideChildrenInMenu ? redirect || path : link || path;
return {
badge,
badgeType,

View File

@@ -68,6 +68,10 @@ interface RouteMeta {
* 开启KeepAlive缓存
*/
keepAlive?: boolean;
/**
* 外链-跳转路径
*/
link?: string;
/**
* 路由是否已经加载过
*/
@@ -80,10 +84,6 @@ interface RouteMeta {
* 用于路由->菜单排序
*/
order?: number;
/**
* 外链-跳转路径
*/
target?: string;
/**
* 标题名称