修复validateForm方法错误。

This commit is contained in:
vdpAdmin 2022-04-17 09:40:22 +08:00
parent dca013e56b
commit 366486658b

View File

@ -548,14 +548,14 @@
this.$refs.renderForm.clearValidate(props) this.$refs.renderForm.clearValidate(props)
}, },
/* 验证表单通过返回true不通过返回false */ /**
validateForm() { * 校验表单
let result = null * @param callback 回调函数
*/
validateForm(callback) {
this.$refs['renderForm'].validate((valid) => { this.$refs['renderForm'].validate((valid) => {
result = valid callback(valid)
}) })
return result
}, },
validateFields() { validateFields() {