feat: 加入导航按钮,支持前进回退,加入歌单详情界面

This commit is contained in:
2026-01-03 14:32:25 +08:00
parent 06a81fdf73
commit 01cb72a88b
8 changed files with 904 additions and 47 deletions

View File

@@ -5,15 +5,17 @@ import { createRouter, createWebHashHistory } from 'vue-router'
import App from './App.vue'
import HomeView from './views/HomeView.vue'
import PlaylistDetailView from './views/PlaylistDetailView.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import TDesign from 'tdesign-vue-next'
import 'tdesign-vue-next/es/style/index.css'
const pinia = createPinia()
const router = createRouter({
history: createWebHashHistory(),
routes: [
{ path: '/', component: HomeView },
{ path: '/playlist/:id', component: PlaylistDetailView },
// 可扩展其他路由
]
})
@@ -21,5 +23,5 @@ const router = createRouter({
const app = createApp(App)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
app.use(TDesign)
app.mount('#app')