fix: 🐛 修复因接口调整而影响的调用页面的问题
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user