mirror of
https://github.com/201206030/novel-front-web.git
synced 2025-07-09 22:56:39 +00:00
Initial commit
This commit is contained in:
27
src/router/index.js
Normal file
27
src/router/index.js
Normal file
@ -0,0 +1,27 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
const router = createRouter({
|
||||
// createWebHistory 路由模式路径不带#号(生产环境下不能直接访问项目,需要 nginx 转发)
|
||||
// createWebHashHistory 路由模式路径带#号
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/home'
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
component: () => import('@/views/Home')
|
||||
|
||||
},
|
||||
{
|
||||
path: '/home',
|
||||
name: 'book',
|
||||
component: () => import('@/views/Home')
|
||||
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
export default router
|
Reference in New Issue
Block a user