mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-13 13:23:42 +08:00
refactor(projects): 代码优化
This commit is contained in:
@@ -5,10 +5,10 @@ import { constantRoutes } from './routes';
|
||||
import { scrollBehavior } from './helpers';
|
||||
import { createRouterGuard } from './guard';
|
||||
|
||||
const { VITE_HASH_ROUTE = 'false', VITE_BASE_URL } = import.meta.env;
|
||||
const { VITE_HASH_ROUTE = '0', VITE_BASE_URL } = import.meta.env;
|
||||
|
||||
export const router = createRouter({
|
||||
history: VITE_HASH_ROUTE === 'true' ? createWebHashHistory(VITE_BASE_URL) : createWebHistory(VITE_BASE_URL),
|
||||
history: VITE_HASH_ROUTE === '1' ? createWebHashHistory(VITE_BASE_URL) : createWebHistory(VITE_BASE_URL),
|
||||
routes: transformAuthRoutesToVueRoutes(constantRoutes),
|
||||
scrollBehavior
|
||||
});
|
||||
|
Reference in New Issue
Block a user