1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

创建前端Vue项目

This commit is contained in:
2022-10-21 14:51:17 +08:00
parent b6cf527080
commit cdb59b0743
20 changed files with 20818 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const routes = [
{
path: '/',
name: 'home',
component: HomeView
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
}
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
export default router