mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复页面滚动行为
This commit is contained in:
@ -11,8 +11,7 @@ const isVercel = import.meta.env.VITE_HTTP_ENV === 'VERCEL';
|
||||
|
||||
const router = createRouter({
|
||||
history: isVercel ? createWebHashHistory() : createWebHistory(),
|
||||
routes,
|
||||
scrollBehavior: () => ({ left: 0, top: 0 })
|
||||
routes
|
||||
});
|
||||
|
||||
export async function setupRouter(app: App) {
|
||||
|
5
src/router/menus.ts
Normal file
5
src/router/menus.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { CustomRoute } from '@/interface';
|
||||
|
||||
export function transformRouteToMenu(routes: CustomRoute[]) {
|
||||
return routes;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import { BasicLayout, BlankLayout } from '@/layouts';
|
||||
import { EnumRoutePath, EnumRouteTitle } from '@/enum';
|
||||
import type { RoutePathKey, LoginModuleType } from '@/interface';
|
||||
import type { CustomRoute, RoutePathKey, LoginModuleType } from '@/interface';
|
||||
import { getLoginModuleRegExp } from '@/utils';
|
||||
|
||||
/** 路由名称 */
|
||||
@ -83,7 +83,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
/**
|
||||
* 自定义路由
|
||||
*/
|
||||
export const customRoutes: Array<RouteRecordRaw> = [
|
||||
export const customRoutes: CustomRoute[] = [
|
||||
{
|
||||
name: RouteNameMap.get('root'),
|
||||
path: EnumRoutePath.root,
|
||||
|
Reference in New Issue
Block a user