refactor: 更新存储菜单组件的弹出位置为顶部右侧,优化HTTP服务实例创建方式以增强类型安全
This commit is contained in:
parent
6163b0baa5
commit
6c7fcb9eba
@ -40,7 +40,7 @@
|
||||
v-if="showSubMenu && selectedLocation"
|
||||
:open="!!showSubMenu"
|
||||
:trigger="[]"
|
||||
placement="rightTop"
|
||||
placement="topRight"
|
||||
:get-popup-container="getSubMenuContainer"
|
||||
@open-change="handleSubMenuOpenChange"
|
||||
>
|
||||
|
@ -2,11 +2,11 @@ import { message } from 'ant-design-vue';
|
||||
import axios, { type AxiosInstance, type AxiosRequestConfig } from 'axios';
|
||||
|
||||
// 创建HTTP实例
|
||||
const http: HttpInstance = axios.create({
|
||||
const http = (axios.create({
|
||||
baseURL: import.meta.env.ENV_HTTP_BASE,
|
||||
adapter: 'fetch',
|
||||
timeout: 30_000,
|
||||
});
|
||||
}) as unknown) as HttpInstance;
|
||||
|
||||
// 添加FormData上传方法
|
||||
http.postFormData = async <D = void>(url: string, formData: FormData, config?: AxiosRequestConfig): Promise<D | undefined> => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user