lx-music-desktop/src/renderer/router.ts
2023-08-07 18:49:14 +08:00

81 lines
1.7 KiB
TypeScript

/* eslint-disable @typescript-eslint/no-var-requires */
// import Vue from 'vue'
import { createRouter, createWebHashHistory } from 'vue-router'
import SearchView from './views/Search/index.vue'
import SongListView from './views/songList/List/index.vue'
import SongListDetailView from './views/songList/Detail/index.vue'
import LeaderboardView from './views/Leaderboard/index.vue'
import ListView from './views/List/index.vue'
import DownloadView from './views/Download/index.vue'
import SettingView from './views/Setting/index.vue'
const router = createRouter({
history: createWebHashHistory(),
routes: [
{
path: '/search',
name: 'Search',
component: SearchView,
meta: {
name: 'Search',
},
},
{
path: '/songList/list',
name: 'SongList',
component: SongListView,
meta: {
name: 'SongList',
},
},
{
path: '/songList/detail',
name: 'SongListDetail',
component: SongListDetailView,
meta: {
name: 'SongList',
},
},
{
path: '/leaderboard',
name: 'Leaderboard',
component: LeaderboardView,
meta: {
name: 'Leaderboard',
},
},
{
path: '/list',
name: 'List',
component: ListView,
meta: {
name: 'List',
},
},
{
path: '/download',
name: 'Download',
component: DownloadView,
meta: {
name: 'Download',
},
},
{
path: '/setting',
name: 'Setting',
component: SettingView,
meta: {
name: 'Setting',
},
},
{ path: '/:pathMatch(.*)*', redirect: '/search' },
],
linkActiveClass: 'active-link',
linkExactActiveClass: 'exact-active-link',
})
export default router