最多选择三个专长

This commit is contained in:
lmj
2022-12-27 15:24:51 +08:00
parent 7414cccfa7
commit 1d1b12223f

View File

@@ -459,8 +459,14 @@
this.childData.forEach(it =>{
if(item == it.id){
this.workname.push(it.name);
console.log(this.workname)
// this.workname.filter(function (item, index, arr) {
// return this.workname.indexOf(item, 0) === index;
// });
// console.log(this.workname,'ces')
}
console.log(this.workname,'lmj')
})
})
})
@@ -545,8 +551,12 @@
},
teacherUpdata(){
if(this.checkboxtearGroup.length <3 && this.checkboxtearGroup.length>=1) {
this.$message.error('至少选择个专长!')
if(this.checkboxtearGroup.length <1 && this.checkboxtearGroup.length>=1) {
this.$message.error('至少选择个专长!')
return;
}
if(this.checkboxtearGroup.length >3 && this.checkboxtearGroup.length>=1) {
this.$message.error('最多选择三个专长!')
return;
}
console.log(this.checkboxtearGroup);