fix: fix incorrent judgment of isHash

This commit is contained in:
张传龙 2022-07-19 16:29:07 +08:00
parent 215998dc66
commit d971e7e4ba

View File

@ -2,7 +2,7 @@ import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router
import { setupRouterGuard } from './guard' import { setupRouterGuard } from './guard'
import { basicRoutes } from './routes' import { basicRoutes } from './routes'
const isHash = !!import.meta.env.VITE_APP_USE_HASH const isHash = import.meta.env.VITE_APP_USE_HASH === 'true'
export const router = createRouter({ export const router = createRouter({
history: isHash ? createWebHashHistory('/') : createWebHistory('/'), history: isHash ? createWebHashHistory('/') : createWebHistory('/'),
routes: [], routes: [],