|
@@ -204,7 +204,6 @@ export default {
|
|
return []
|
|
return []
|
|
}
|
|
}
|
|
// console.log(file, filesList, this.beforeUpload(file, 0))
|
|
// console.log(file, filesList, this.beforeUpload(file, 0))
|
|
- alert(file.type)
|
|
|
|
if (!this.beforeUpload(file, 0) && file.status != 'removed') {
|
|
if (!this.beforeUpload(file, 0) && file.status != 'removed') {
|
|
const index = filesList.findIndex(item => item.uid == file.uid)
|
|
const index = filesList.findIndex(item => item.uid == file.uid)
|
|
filesList.splice(index, 1)
|
|
filesList.splice(index, 1)
|
|
@@ -225,6 +224,7 @@ export default {
|
|
}
|
|
}
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
+ alert(file.type)
|
|
const isType = this.fileType.indexOf(file.type) >= 0 && file.type != ''
|
|
const isType = this.fileType.indexOf(file.type) >= 0 && file.type != ''
|
|
// 文件格式限制为.xls、.xlsx时,上传.csv文件的type为application/vnd.ms-excel,与.xls一致,无法限制,因此更改为:
|
|
// 文件格式限制为.xls、.xlsx时,上传.csv文件的type为application/vnd.ms-excel,与.xls一致,无法限制,因此更改为:
|
|
if (!isType || file.name.indexOf('.csv') >= 0) {
|
|
if (!isType || file.name.indexOf('.csv') >= 0) {
|