修改为history
This commit is contained in:
parent
1b7e2b37bb
commit
40bce0a68f
|
|
@ -1,4 +1,4 @@
|
||||||
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
|
||||||
import Layout from '@/layout/index.vue'
|
import Layout from '@/layout/index.vue'
|
||||||
export const indexName = Symbol('index')
|
export const indexName = Symbol('index')
|
||||||
/**
|
/**
|
||||||
|
|
@ -87,7 +87,7 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
routes: constantRoutes,
|
routes: constantRoutes,
|
||||||
scrollBehavior(to, from, savedPosition) {
|
scrollBehavior(to, from, savedPosition) {
|
||||||
if (savedPosition) {
|
if (savedPosition) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import path from 'path'
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
// 引入第三方的配置
|
// 引入第三方的配置
|
||||||
base: '/admin/',
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, 'src'),
|
'@': path.resolve(__dirname, 'src'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue