mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-07-07 18:07:32 +08:00
修改左侧导航栏, 添加歌单页面
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
const layoutRouter = [
|
||||
{
|
||||
path: "/",
|
||||
name: "home",
|
||||
mate: {
|
||||
keepAlive: true,
|
||||
title: "首页",
|
||||
icon: "icon-Home",
|
||||
},
|
||||
component: () => import("@/views/home/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "/search",
|
||||
name: "search",
|
||||
mate: {
|
||||
title: "搜索",
|
||||
keepAlive: true,
|
||||
icon: "icon-Search",
|
||||
},
|
||||
component: () => import("@/views/search/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "/list",
|
||||
name: "list",
|
||||
mate: {
|
||||
title: "歌单",
|
||||
keepAlive: true,
|
||||
icon: "icon-Paper",
|
||||
},
|
||||
component: () => import("@/views/list/index.vue"),
|
||||
},
|
||||
];
|
||||
|
||||
export default layoutRouter;
|
||||
+2
-13
@@ -1,23 +1,12 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import AppLayout from "@/layout/AppLayout.vue";
|
||||
const layoutRouter = [
|
||||
{
|
||||
path: "",
|
||||
name: "home",
|
||||
component: () => import("@/views/home/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "/search",
|
||||
name: "search",
|
||||
component: () => import("@/views/search/index.vue"),
|
||||
},
|
||||
];
|
||||
import homeRouter from "@/router/home";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: "/",
|
||||
component: AppLayout,
|
||||
children: layoutRouter,
|
||||
children: homeRouter,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user