submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
//成功
this.$message({
showClose: true,
type: "success",
message:'校验通过啦!',
});
} else {
//失败
this.$message({
showClose: true,
type: "error",
message: "表单验证失败!",
});
return false;
}
});
elementUI 表单校验提交时判断
于 2023-01-17 10:11:22 首次发布