refactor: 更新存储菜单组件的弹出位置为顶部右侧,优化HTTP服务实例创建方式以增强类型安全

This commit is contained in:
xudan 2025-09-15 09:11:13 +08:00
parent 6163b0baa5
commit 6c7fcb9eba
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@
v-if="showSubMenu && selectedLocation"
:open="!!showSubMenu"
:trigger="[]"
placement="rightTop"
placement="topRight"
:get-popup-container="getSubMenuContainer"
@open-change="handleSubMenuOpenChange"
>

View File

@ -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> => {