element Tabs 标签页下的表单验证不通过定位

tabs下的表单提交时不通过则直接打开对应的tabs,并爆红所在验证input



			this.$refs["form"].validate((valid,obj) => {
    
    
				if (valid && !this.isSame(groupName)) {
    
    
				if (this.active++ > 2) this.active = 0;
				} else if (this.isSame(groupName)) {
    
    
					this.msgError('名称不能重复')
				} else if (!valid) {
    
    
				this.msgError('请正确填写必填项');
			
				for(let key in obj){
    
    
					if(JSON.stringify(key).indexOf("groupList.0") >= 1){
    
    
						return this.activeName=0;
					}else if(JSON.stringify(key).indexOf("groupList.1") >= 1){
    
    
						return this.activeName=1;
					}else if(JSON.stringify(key).indexOf("groupList.2") >= 1){
    
    
						return this.activeName=2;
					}
					}
				}
			})

猜你喜欢

转载自blog.csdn.net/weixin_45895806/article/details/111539717