chore: format code (#3773)

* first commit

* style: 格式化代码
This commit is contained in:
zhang 2024-04-22 09:00:49 +08:00 committed by GitHub
parent d9b9e53d33
commit 9c027fdcf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 18 additions and 17 deletions

View File

@ -11,13 +11,13 @@ VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
VITE_GLOB_API_URL = /basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_API_URL_PREFIX =
VITE_ENABLE_ANALYZE = true

View File

@ -5,10 +5,10 @@ VITE_USE_MOCK = true
VITE_PUBLIC_PATH = /
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
VITE_GLOB_API_URL = /basic-api
# File upload address optional
VITE_GLOB_UPLOAD_URL=/upload
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_API_URL_PREFIX =

View File

@ -13,10 +13,10 @@ VITE_DROP_CONSOLE = true
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
VITE_GLOB_API_URL="__vg_base_url"
VITE_GLOB_API_URL = "__vg_base_url"
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/files/upload
VITE_GLOB_UPLOAD_URL = /files/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_API_URL_PREFIX =

View File

@ -11,11 +11,11 @@ VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
VITE_GLOB_API_URL = /basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_API_URL_PREFIX =

View File

@ -1,4 +1,4 @@
NODE_ENV=production
NODE_ENV = production
# Whether to open mock
VITE_USE_MOCK = true
@ -11,11 +11,11 @@ VITE_PUBLIC_PATH = /
VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL=/basic-api
VITE_GLOB_API_URL = /basic-api
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=/upload
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_API_URL_PREFIX =

View File

@ -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;
});
}