From 1d1b12223fddf65a4ff679bcf1dee4bca0521eb1 Mon Sep 17 00:00:00 2001 From: lmj <3407000732@qq.com> Date: Tue, 27 Dec 2022 15:24:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E5=A4=9A=E9=80=89=E6=8B=A9=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E4=B8=93=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Setting.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index 9df083d4..d906d426 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -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);