瀏覽代碼

修改为history。

jiaxiaoqiang 11 月之前
父節點
當前提交
09c59eaee8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/router/index.ts

+ 2 - 2
src/router/index.ts

@@ -1,4 +1,4 @@
-import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
+import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
 
 export const Layout = () => import("@/layout/index.vue");
 
@@ -57,7 +57,7 @@ export const constantRoutes: RouteRecordRaw[] = [
  * 创建路由
  */
 const router = createRouter({
-  history: createWebHashHistory(),
+  history: createWebHistory(),
   routes: constantRoutes,
   // 刷新时,滚动条位置还原
   scrollBehavior: () => ({ left: 0, top: 0 }),