mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
🎨 feat(wiki): 添加 wiki 路由
This commit is contained in:
@@ -2,13 +2,12 @@
|
|||||||
* @file router modules main.ts
|
* @file router modules main.ts
|
||||||
* @description 主路由模块
|
* @description 主路由模块
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
* @since Alpha v0.1.2
|
* @since Alpha v0.1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 信息展示
|
// 信息展示
|
||||||
import Announcements from "../../pages/Announcements.vue";
|
import Announcements from "../../pages/Announcements.vue";
|
||||||
import Home from "../../pages/Home.vue";
|
import Home from "../../pages/Home.vue";
|
||||||
import GCG from "../../pages/WIKI/GCG.vue";
|
|
||||||
// 数据交互
|
// 数据交互
|
||||||
import Achievements from "../../pages/Achievements.vue";
|
import Achievements from "../../pages/Achievements.vue";
|
||||||
// 应用配置相关
|
// 应用配置相关
|
||||||
@@ -35,11 +34,6 @@ const mainRoutes = [
|
|||||||
name: "设置",
|
name: "设置",
|
||||||
component: Config,
|
component: Config,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/GCG",
|
|
||||||
name: "卡牌",
|
|
||||||
component: GCG,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "/home",
|
path: "/home",
|
||||||
redirect: "/",
|
redirect: "/",
|
||||||
|
|||||||
50
src/router/modules/wiki.ts
Normal file
50
src/router/modules/wiki.ts
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/**
|
||||||
|
* @file router modules wiki.ts
|
||||||
|
* @description wiki 路由模块
|
||||||
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
|
* @since Alpha v0.1.3
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Wiki main
|
||||||
|
import GCG from "../../pages/WIKI/GCG.vue";
|
||||||
|
import Character from "../../pages/WIKI/Character.vue";
|
||||||
|
import Weapon from "../../pages/WIKI/Weapon.vue";
|
||||||
|
// Wiki sub
|
||||||
|
import TGCG from "../../views/WIKI/t-gcg.vue";
|
||||||
|
import TCharacter from "../../views/WIKI/t-character.vue";
|
||||||
|
import TWeapon from "../../views/WIKI/t-weapon.vue";
|
||||||
|
|
||||||
|
const wikiRoutes = [
|
||||||
|
{
|
||||||
|
path: "/wiki/GCG",
|
||||||
|
name: "卡牌图鉴",
|
||||||
|
component: GCG,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/wiki/character",
|
||||||
|
name: "角色图鉴",
|
||||||
|
component: Character,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/wiki/weapon",
|
||||||
|
name: "武器图鉴",
|
||||||
|
component: Weapon,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/wiki/GCG_detail/:id",
|
||||||
|
name: "卡牌详情",
|
||||||
|
component: TGCG,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/wiki/character_detail/:id",
|
||||||
|
name: "角色详情",
|
||||||
|
component: TCharacter,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/wiki/weapon_detail/:id",
|
||||||
|
name: "武器详情",
|
||||||
|
component: TWeapon,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default wikiRoutes;
|
||||||
@@ -2,15 +2,17 @@
|
|||||||
* @file router routes.ts
|
* @file router routes.ts
|
||||||
* @description 路由配置
|
* @description 路由配置
|
||||||
* @author BTMuli<bt-muli@outlook.com>
|
* @author BTMuli<bt-muli@outlook.com>
|
||||||
* @since Alpha
|
* @since Alpha v0.1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 主路由
|
// 主路由
|
||||||
import mainRoutes from "./modules/main";
|
import mainRoutes from "./modules/main";
|
||||||
// 子路由
|
// 子路由
|
||||||
import subRoutes from "./modules/sub";
|
import subRoutes from "./modules/sub";
|
||||||
|
// Wiki 路由
|
||||||
|
import wikiRoutes from "./modules/wiki";
|
||||||
|
|
||||||
// 合并路由
|
// 合并路由
|
||||||
const routes = [...mainRoutes, ...subRoutes];
|
const routes = [...mainRoutes, ...subRoutes, ...wikiRoutes];
|
||||||
|
|
||||||
export default routes;
|
export default routes;
|
||||||
|
|||||||
Reference in New Issue
Block a user