三元表达式
:disabled="submitDisable" //绑定事件
disabled 属性规定应该禁用 input 元素。
被禁用的 input 元素既不可用,也不可点击。可以设置 disabled 属性,直到满足某些其他的条件为止
submitDisable(){
// 暂存
if(this.batch){
// 批量上传TODO
let err = 0
if(this.uploadData.file_type==1){
this.textList_Copy.map((item,key)=>{
if(item.fileCode && item.ecnCode){
err +=1
}
})
}else{
this.textList_Copy.map((item,key)=>{
if(item.fileCode){
err +=1
}
})
}
if(
this.uploadData.uploadData.belongId &&
this.textList.length &&
err==this.textList.length
){
return false;
}
}else{
if(this.uploadData.file_type==1){
if(
this.uploadData.uploadData.belongId &&
this.uploadData.uploadData.fileCode &&
this.uploadData.uploadData.ecnCode &&
this.uploadData.uploadData.textId
){
return false;
}
}else{
if(
this.uploadData.uploadData.belongId &&
this.uploadData.uploadData.fileCode &&
this.uploadData.uploadData.textId
){
return false;
}
}
}
return true;
}