|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { createRouter,createWebHistory,RouteRecordRaw } from "vue-router"; |
|
|
|
import { createRouter,createWebHistory,createWebHashHistory,RouteRecordRaw } from "vue-router"; |
|
|
|
//进度条
|
|
|
|
import NProgress from "nprogress"; |
|
|
|
import "nprogress/nprogress.css"; |
|
|
|
@ -76,7 +76,7 @@ export const staticRouting : RouteRecordRaw[] = [ |
|
|
|
// createWebHistory:创建history模式的路由
|
|
|
|
|
|
|
|
const router = createRouter({ |
|
|
|
history: createWebHistory(import.meta.env.BASE_URL), |
|
|
|
history: createWebHashHistory(import.meta.env.BASE_URL), |
|
|
|
routes: staticRouting as RouteRecordRaw[], |
|
|
|
// 刷新时,滚动条位置还原
|
|
|
|
scrollBehavior: () => ({ left: 0, top: 0 }), |
|
|
|
|