feat: 调整为路由模式

This commit is contained in:
ChenZhaoYu committed 2023-02-13 12:38:44 +08:00
1 parent 39f718ef16
commit 951636869b
16 files changed
+316 -23

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import type { App } from 'vue'
import type { RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'Home',
component: () => import('@/views/Home/index.vue'),
},
]
export const router = createRouter({
history: createWebHashHistory(),
routes,
scrollBehavior: () => ({ left: 0, top: 0 }),
})
export async function setupRouter(app: App) {
app.use(router)
await router.isReady()
}