|
@@ -324,12 +324,12 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- this.noneBtnDealImg = fileList.length >= this.limitCountImg;
|
|
|
+ // this.noneBtnDealImg = fileList.length >= this.limitCountImg;
|
|
|
},
|
|
|
handleExceed(files, fileList) {
|
|
|
this.$message.warning(`当前限制选择 1 个文件`);
|
|
|
},
|
|
|
- beforeUpload(files){
|
|
|
+ beforeUpload(files,fileList){
|
|
|
var testmsg=files.name.substring(files.name.lastIndexOf('.')+1);
|
|
|
const extension2 = testmsg === 'docx'
|
|
|
if(!extension2){
|
|
@@ -338,7 +338,12 @@ export default {
|
|
|
return extension2;
|
|
|
},
|
|
|
dealImgChange(files, fileList){
|
|
|
- this.noneBtnDealImg = fileList.length >= this.limitCountImg;
|
|
|
+ var testmsg=files.name.substring(files.name.lastIndexOf('.')+1);
|
|
|
+ const extension2 = testmsg === 'docx'
|
|
|
+ if(extension2){
|
|
|
+ this.noneBtnDealImg = fileList.length >= this.limitCountImg;
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//手动上传文件触发
|
|
|
httpRequest(param) {
|
|
@@ -358,12 +363,11 @@ export default {
|
|
|
this.msgSuccess("上传成功");
|
|
|
loading.close();
|
|
|
}
|
|
|
- this.noneBtnDealImg = fileList.length >= this.limitCountImg;
|
|
|
}).catch((response) =>{
|
|
|
if(!response){
|
|
|
this.$message.warning(`上传失败`);
|
|
|
}
|
|
|
- this.noneBtnDealImg = fileList.length >= this.limitCountImg;
|
|
|
+ this.noneBtnDealImg = this.fileList.length >= this.limitCountImg;
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|