|
@@ -6,6 +6,7 @@ import { AxiosCanceler } from '@/utils/http/axios/axiosCancel';
|
|
|
import { Modal, notification } from 'ant-design-vue';
|
|
|
import { warn } from '@/utils/log';
|
|
|
import { unref } from 'vue';
|
|
|
+import { prefixCls } from '@/settings/designSetting';
|
|
|
import { setRouteChange } from '@/logics/mitt/routeChange';
|
|
|
import { createPermissionGuard } from './permissionGuard';
|
|
|
import { createStateGuard } from './stateGuard';
|
|
@@ -104,7 +105,7 @@ function createScrollGuard(router: Router) {
|
|
|
router.afterEach(async (to) => {
|
|
|
// scroll top
|
|
|
isHash((to as RouteLocationNormalized & { href: string })?.href) &&
|
|
|
- document.querySelector('.vben-layout-content')?.scrollTo(0, 0);
|
|
|
+ document.querySelector(`.${prefixCls}-layout-content`)?.scrollTo(0, 0);
|
|
|
return true;
|
|
|
});
|
|
|
}
|