記錄一下: upload上傳組件在before-upload里return false之后自動觸發了before-remove方法
1 beforeRemove(file, fileList) { 2 if (file && file.status==="success") { 3 return this.$confirm(`確定移除 ${ file.name }?`); 4 } 5 }
只需在自動觸發的方法里,加上 if (file && file.status==="success") 條件判斷