mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-24 23:47:17 +08:00
perf: route rank is null
This commit is contained in:
parent
8a926c509f
commit
12c2365a26
@ -23,6 +23,7 @@ import { getAsyncRoutes } from "/@/api/routes";
|
|||||||
// 按照路由中meta下的rank等级升序来排序路由
|
// 按照路由中meta下的rank等级升序来排序路由
|
||||||
function ascending(arr: any[]) {
|
function ascending(arr: any[]) {
|
||||||
arr.forEach(v => {
|
arr.forEach(v => {
|
||||||
|
if (v?.meta?.rank === null) v.meta.rank = undefined;
|
||||||
if (v?.meta?.rank === 0) {
|
if (v?.meta?.rank === 0) {
|
||||||
if (v.name !== "home" && v.path !== "/") {
|
if (v.name !== "home" && v.path !== "/") {
|
||||||
console.warn("rank only the home page can be 0");
|
console.warn("rank only the home page can be 0");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user