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