e229e31079
- Gin的*filepath参数包含开头的/,需要去除 - 修复路径拼接导致的双斜杠问题 - 移除自动刷新逻辑,这不是正确的解决方案
19 lines
415 B
TypeScript
19 lines
415 B
TypeScript
import type { RouteRecordRaw } from 'vue-router'
|
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
|
|
import { createRouterGuard } from './guard'
|
|
import routes from './routes'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: routes as RouteRecordRaw[],
|
|
scrollBehavior() {
|
|
return { left: 0, top: 0, behavior: 'smooth' }
|
|
},
|
|
})
|
|
|
|
createRouterGuard(router)
|
|
|
|
export default router
|