From 9c027fdcf5be48892fcc6e5e1ce8b78e3df4eb9c Mon Sep 17 00:00:00 2001
From: zhang <zwtvip@qq.com>
Date: 星期一, 22 四月 2024 09:00:49 +0800
Subject: [PATCH] chore: format code (#3773)

---
 src/router/guard/index.ts |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/router/guard/index.ts b/src/router/guard/index.ts
index f643cc2..ee141ff 100644
--- a/src/router/guard/index.ts
+++ b/src/router/guard/index.ts
@@ -6,6 +6,7 @@
 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 @@
   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;
   });
 }

--
Gitblit v1.8.0