fix: 修改路由模式
This commit is contained in:
parent
075c39d2b7
commit
0499e36a5b
|
|
@ -1,5 +1,5 @@
|
|||
import type { App } from "vue";
|
||||
import { createRouter, createWebHashHistory, type RouteRecordRaw } from "vue-router";
|
||||
import { createRouter, createWebHashHistory, createWebHistory, type RouteRecordRaw } from "vue-router";
|
||||
|
||||
export const Layout = () => import("@/layout/index.vue");
|
||||
|
||||
|
|
@ -676,7 +676,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||
* 创建路由
|
||||
*/
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
history: createWebHistory(),
|
||||
routes: constantRoutes,
|
||||
// 刷新时,滚动条位置还原
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
|
|
|
|||
Loading…
Reference in New Issue