Browse Source

文件删除问题

master
ljlong_2630 7 months ago
parent
commit
c74b5bd22b
  1. 4
      src/components/UploadFile/src/UploadFile.vue

4
src/components/UploadFile/src/UploadFile.vue

@ -145,7 +145,11 @@ const excelUploadError: UploadProps['onError'] = (): void => {
} }
// //
const handleRemove = (file) => { const handleRemove = (file) => {
debugger
console.log(fileList.value)
console.log(file.name)
const findex = fileList.value.map((f) => f.name).indexOf(file.name) const findex = fileList.value.map((f) => f.name).indexOf(file.name)
console.log(findex)
if (findex > -1) { if (findex > -1) {
fileList.value.splice(findex, 1) fileList.value.splice(findex, 1)
emit('update:modelValue', listToString(fileList.value)) emit('update:modelValue', listToString(fileList.value))

Loading…
Cancel
Save