| | |
| | | const tableData = ref([]) // 附件表格数据 |
| | | // 文件移除 |
| | | const handleFileRemove = (file, fileList) => { |
| | | console.log('删除文件', fileList); |
| | | uploadedFiles.value = fileList |
| | | // 从已上传文件列表中移除对应文件 |
| | | // if (file.response && file.response.attachId) { |
| | | // // uploadedFiles.value = uploadedFiles.value.filter(item => item.attachId !== file.response.attachId) |
| | | // // 找到 id=1 的对象的索引 |
| | | // const index = uploadedFiles.value.findIndex(item => item.attachId !== file.response.attachId) |
| | | |
| | | // // 如果找到了,移除该对象 |
| | | // if (index !== -1) { |
| | | // uploadedFiles.value.splice(index, 1) |
| | | // } |
| | | // console.log('删除文件', uploadedFiles.value); |
| | | |
| | | // } |
| | | // 清空响应数据 |
| | | if (responseData.value && responseData.value.attachId === file.response?.attachId) { |
| | | responseData.value = null |