mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-23 01:30:26 +08:00
parent
d9b9e53d33
commit
9c027fdcf5
@ -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
|
||||
|
@ -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 =
|
||||
|
@ -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 =
|
||||
|
@ -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 =
|
||||
|
@ -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 =
|
||||
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user