mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-11-26 04:23:40 +08:00
chore: 重构图标
This commit is contained in:
@@ -9,7 +9,6 @@ const errorRouter = {
|
||||
meta: {
|
||||
icon: "position",
|
||||
title: $t("menus.hserror"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 7
|
||||
},
|
||||
@@ -20,8 +19,7 @@ const errorRouter = {
|
||||
component: () => import("/@/views/error/401.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsfourZeroOne"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
i18n: true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -30,8 +28,7 @@ const errorRouter = {
|
||||
component: () => import("/@/views/error/404.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsfourZeroFour"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
i18n: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -8,7 +8,6 @@ const externalLink = {
|
||||
meta: {
|
||||
icon: "link",
|
||||
title: $t("menus.externalLink"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 190
|
||||
},
|
||||
@@ -17,7 +16,6 @@ const externalLink = {
|
||||
path: "https://github.com/xiaoxian521/vue-pure-admin",
|
||||
meta: {
|
||||
title: $t("menus.externalLink"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 191
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ const homeRouter = {
|
||||
meta: {
|
||||
icon: "home-filled",
|
||||
title: $t("menus.hshome"),
|
||||
showLink: true,
|
||||
i18n: true,
|
||||
rank: 0
|
||||
},
|
||||
@@ -20,8 +19,7 @@ const homeRouter = {
|
||||
component: () => import("/@/views/welcome.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hshome"),
|
||||
i18n: true,
|
||||
showLink: true
|
||||
i18n: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -30,7 +30,7 @@ function ascending(arr: any[]) {
|
||||
// 过滤meta中showLink为false的路由
|
||||
function filterTree(data: RouteComponent[]) {
|
||||
const newTree = data.filter(
|
||||
(v: { meta: { showLink: boolean } }) => v.meta.showLink
|
||||
(v: { meta: { showLink: boolean } }) => v.meta?.showLink !== false
|
||||
);
|
||||
newTree.forEach(
|
||||
(v: { children }) => v.children && (v.children = filterTree(v.children))
|
||||
|
||||
Reference in New Issue
Block a user