<div v-for="(arg, index) in list" :key="index"> <el-form ref="`form-${index + 1}`" :model="arg"></el-form> </div>
let count = 0 list.forEach((v, i) => { this.$refs[`form-${i+1}`].validate(valid => { if (valid) { count++ } }) }) if (count === list.length) { alert('校验通过') }
标签:count,list,校验,表单,valid,element From: https://www.cnblogs.com/150536FBB/p/16597509.html