修改路由为hash,打包

This commit is contained in:
Jason
2022-07-27 19:10:46 +08:00
parent d2210c1a76
commit b5eb500eaf
729 changed files with 154 additions and 1242 deletions

View File

@@ -1,4 +1,4 @@
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'
export const indexName = Symbol('index')
/**
@@ -87,7 +87,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
]
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {