优化目录结构,以及插件

This commit is contained in:
Gary Fu
2023-12-23 19:45:40 +08:00
parent 5adcc63839
commit bb40594f2a
22 changed files with 1237 additions and 805 deletions

30
src/route/routes.js Normal file
View File

@@ -0,0 +1,30 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomeView,
children: [{
path: 'about',
name: 'about',
component: () => import('@/views/AboutView.vue')
}, {
path: 'personal',
name: 'personal',
component: () => import('@/views/PersonalInfo.vue')
},
{
path: '/:pathMatch(.*)*',
name: 'notFound',
component: () => import('@/views/404.vue')
}]
}
],
scrollBehavior: () => ({ left: 0, top: 0 })
})
export default router