Files
frost-navigation/src/router/index.js

70 lines
1.6 KiB
JavaScript
Raw Normal View History

2024-08-28 13:01:50 +08:00
import {
createRouter,
createWebHashHistory,
} from 'vue-router';
import {
ENABLE_SEARCH_MODULE,
ENABLE_NAV_MODULE,
ENABLE_TOOLBOX_MODULE,
} from '@/config/modules';
2024-08-26 14:07:57 +08:00
import AboutView from '@/views/AboutView/AboutView.vue';
import IndexView from '@/views/IndexView/IndexView.vue';
export const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'IndexView',
component: IndexView,
2024-08-27 20:59:54 +08:00
meta: {
iconClass: 'mdi mdi-home-outline',
showInAside: true,
title: '主页',
},
2024-08-26 14:07:57 +08:00
},
{
2024-08-27 20:59:54 +08:00
path: '/search-view',
name: 'SearchView',
component: () => import('@/views/SearchView/SearchView.vue'),
meta: {
iconClass: 'mdi mdi-magnify',
2024-08-28 13:01:50 +08:00
showInAside: ENABLE_SEARCH_MODULE,
2024-08-27 20:59:54 +08:00
title: '搜索',
},
2024-08-26 14:07:57 +08:00
},
{
path: '/nav-view',
name: 'NavView',
component: () => import('@/views/NavView/NavView.vue'),
2024-08-27 20:59:54 +08:00
meta: {
iconClass: 'mdi mdi-compass-outline',
2024-08-28 13:01:50 +08:00
showInAside: ENABLE_NAV_MODULE,
2024-08-27 20:59:54 +08:00
title: '导航',
},
2024-08-26 14:07:57 +08:00
},
{
path: '/toolbox-view',
name: 'ToolboxView',
component: () => import('@/views/ToolboxView/ToolboxView.vue'),
2024-08-27 20:59:54 +08:00
meta: {
iconClass: 'mdi mdi-tools',
2024-08-28 13:01:50 +08:00
showInAside: ENABLE_TOOLBOX_MODULE,
2024-08-27 20:59:54 +08:00
title: '工具箱',
},
},
{
path: '/about-view',
name: 'AboutView',
component: AboutView,
meta: {
iconClass: 'mdi mdi-information-outline',
showInAside: true,
title: '关于',
},
2024-08-26 14:07:57 +08:00
},
],
});