上传name
This commit is contained in:
parent
a06cb42a7a
commit
a72be8adda
@ -135,7 +135,7 @@ const actionFile=async (fileChild:any)=>{
|
||||
const res =await upload(formData)
|
||||
console.log(res)
|
||||
emit('update:imageUrl',res.fileUrl);
|
||||
emit('changeFileName',res.fileName)
|
||||
emit('changeFileName',res.originalName)
|
||||
// 调用 el-form 内部的校验方法(可自动校验)
|
||||
formItemContext?.prop && formContext?.validateField([formItemContext.prop as string]);
|
||||
} catch (error) {
|
||||
|
@ -118,17 +118,17 @@ const handleHttpUpload = async (options: UploadRequestOptions) => {
|
||||
if (editIndex !== '') {
|
||||
list.splice(editIndex, 1, {
|
||||
url: res.fileUrl,
|
||||
name: res.fileName,
|
||||
name: res.originalName,
|
||||
filePath: res.fileUrl,
|
||||
fileName: res.fileName
|
||||
fileName: res.originalName
|
||||
})
|
||||
editIndex = ''
|
||||
} else {
|
||||
list.push({
|
||||
url: res.fileUrl,
|
||||
name: res.fileName,
|
||||
name: res.originalName,
|
||||
filePath: res.fileUrl,
|
||||
fileName: res.fileName
|
||||
fileName: res.originalName
|
||||
})
|
||||
}
|
||||
emit('upload', list,props.zIndex)
|
||||
|
@ -120,13 +120,13 @@ const handleHttpUpload = async (options: UploadRequestOptions) => {
|
||||
let list=JSON.parse(JSON.stringify(props.fileList))
|
||||
list.push({
|
||||
url: res.fileUrl,
|
||||
name: res.fileName,
|
||||
name: res.originalName,
|
||||
filePath: res.fileUrl,
|
||||
fileName: res.fileName,
|
||||
fileName: res.originalName,
|
||||
})
|
||||
emit('upload', list,props.zIndex)
|
||||
}else{
|
||||
emit("upload", res.fileUrl,res.fileName,props.zIndex);
|
||||
emit("upload", res.fileUrl,res.originalName,props.zIndex);
|
||||
}
|
||||
} catch (error) {
|
||||
ElNotification({
|
||||
|
Loading…
Reference in New Issue
Block a user