♻️ 动态路由,提高加载速度

This commit is contained in:
BTMuli
2023-10-17 20:32:13 +08:00
parent a7ad394c4f
commit 2f34b1be45
8 changed files with 27 additions and 61 deletions

View File

@@ -1,55 +1,44 @@
/**
* @file router modules wiki.ts
* @description wiki 路由模块
* @author BTMuli <bt-muli@outlook.com>
* @since Alpha v0.2.1
* @since Beta v0.3.3
*/
// Wiki main
import Abyss from "../../pages/WIKI/Abyss.vue";
import Character from "../../pages/WIKI/Character.vue";
import GCG from "../../pages/WIKI/GCG.vue";
import Weapon from "../../pages/WIKI/Weapon.vue";
// Wiki sub
import TCharacter from "../../views/WIKI/t-character.vue";
import TGCG from "../../views/WIKI/t-gcg.vue";
import TWeapon from "../../views/WIKI/t-weapon.vue";
const wikiRoutes = [
{
path: "/wiki/abyss",
name: "深渊数据库",
component: Abyss,
component: async () => await import("../../pages/WIKI/Abyss.vue"),
},
{
path: "/wiki/character",
name: "角色图鉴",
component: Character,
component: async () => await import("../../pages/WIKI/Character.vue"),
},
{
path: "/wiki/GCG",
name: "卡牌图鉴",
component: GCG,
component: async () => await import("../../pages/WIKI/GCG.vue"),
},
{
path: "/wiki/weapon",
name: "武器图鉴",
component: Weapon,
component: async () => await import("../../pages/WIKI/Weapon.vue"),
},
{
path: "/wiki/detail/character/:id",
name: "角色详情",
component: TCharacter,
component: async () => await import("../../views/WIKI/t-character.vue"),
},
{
path: "/wiki/detail/GCG/:id",
name: "卡牌详情",
component: TGCG,
component: async () => await import("../../views/WIKI/t-gcg.vue"),
},
{
path: "/wiki/detail/weapon/:id",
name: "武器详情",
component: TWeapon,
component: async () => await import("../../views/WIKI/t-weapon.vue"),
},
];