fix: 修复附件上传和展示问题

This commit is contained in:
dj
2025-04-13 21:22:22 +08:00
parent 5cf2e4d208
commit e20f8cad7f
2 changed files with 23 additions and 1 deletions

View File

@@ -171,7 +171,9 @@ const init = reactive({
loading.close()
console.log("🚀 ~ file:res.data ", res.data)
fileLists.value.push(res.data)
emit('getFiles',fileLists.value)
if(meta.filetype !== "image"){
emit('getFiles',fileLists.value)
}
const fileUrl = res.data.url;
// '?fileId='+res.data.id+
callback(fileUrl + '?fileName=' + res.data.originalFilename, {text: file.name, title: file.name});