fix: 🐛 修复因接口调整而影响的调用页面的问题

This commit is contained in:
hxr
2024-05-04 13:15:06 +08:00
parent 088bc5e48f
commit 425841ad45
6 changed files with 13 additions and 14 deletions

View File

@@ -78,7 +78,7 @@ watch(
*/
async function handleUpload(options: UploadRequestOptions): Promise<any> {
// 上传API调用
const { data: fileInfo } = await FileAPI.upload(options.file);
const data = await FileAPI.upload(options.file);
// 上传成功需手动替换文件路径为远程URL否则图片地址为预览地址 blob:http://
const fileIndex = fileList.value.findIndex(
@@ -86,8 +86,8 @@ async function handleUpload(options: UploadRequestOptions): Promise<any> {
);
fileList.value.splice(fileIndex, 1, {
name: fileInfo.name,
url: fileInfo.url,
name: data.name,
url: data.url,
} as UploadUserFile);
emit(