修改了路由模式

This commit is contained in:
Coldin04 2025-04-26 12:48:47 +08:00
parent dd7b04a725
commit 803a3f2feb
2 changed files with 3 additions and 2 deletions

View file

@ -1,10 +1,10 @@
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',

View file

@ -15,4 +15,5 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
base: './' // 设置为相对路径部署
})