原因
rules没有设置trigger校验触发的方式
解决办法
设置上即可,如:
rules: {
username: [
{required: true, message: '该项不能为空', trigger: 'blur'} // trigger: 'blur'
],
...
}
标签:el,form,解决办法,rules,校验,trigger,为空
From: https://www.cnblogs.com/aiyablog/p/17594031.html
rules没有设置trigger校验触发的方式
设置上即可,如:
rules: {
username: [
{required: true, message: '该项不能为空', trigger: 'blur'} // trigger: 'blur'
],
...
}
标签:el,form,解决办法,rules,校验,trigger,为空
From: https://www.cnblogs.com/aiyablog/p/17594031.html