-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Description
Version
Vben Admin V5
Description
1、vite.confit.ts支持从.env 环境变量读取主机地址。建议在配置.env变量中新增一个VITE_GLOB_HOST_URL 变量配置到vite.config.ts文件中。
# 主机地址(建议新增)
VITE_GLOB_HOST_URL=http://vben.pro
# 接口前缀地址
VITE_GLOB_API_URL=/api
2、import { baseRequestClient, requestClient } from '#/api/request',requestClient.download支持传递本地路径下载文件同时传递token支持后台鉴权。调用方式如:
export function exportSysApi(params?: any) {
return requestClient.download(`/api${Api.BASE_URL}/export`, { params });
}
Proposed Solution
同上
Alternatives Considered
No response
Additional Context
No response
Validations
- Read the docs
- Ensure the code is up to date. (Some issues have been fixed in the latest version)
- I have searched the existing issues and checked that my issue does not duplicate any existing issues.