修改左侧导航栏, 添加歌单页面

This commit is contained in:
alger
2021-09-29 15:26:13 +08:00
parent 102c17db2f
commit e108059773
12 changed files with 648 additions and 62 deletions
+34
View File
@@ -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
View File
@@ -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,
},
];