浏览代码

chore: 使用hash模式

chenlei 2 年之前
父节点
当前提交
3ced24cb39
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/router/index.ts

+ 2 - 2
src/router/index.ts

@@ -1,4 +1,4 @@
-import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
+import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
 
 const routes: Array<RouteRecordRaw> = [
   {
@@ -9,7 +9,7 @@ const routes: Array<RouteRecordRaw> = [
 ];
 
 const router = createRouter({
-  history: createWebHistory(process.env.BASE_URL),
+  history: createWebHashHistory(process.env.BASE_URL),
   routes,
 });