提交 24188dd2 编写于 作者: 史文彬's avatar 史文彬

feat: 验证规则

上级 6df543ad
......@@ -224,7 +224,7 @@ export default {
idCard: '',
idType: 1 /** 默认为1:身份证 */,
name: '',
sex: 1,
sex: '',
birthTime: '',
},
showProtocol: false,
......@@ -245,11 +245,16 @@ export default {
},
computed: {
canSubmit() {
return (
const normalValidate =
this.dectionForm.idCard &&
this.dectionForm.name &&
this.dectionForm.mobilePhone
);
this.dectionForm.mobilePhone;
if (this.dectionForm.idType != 1) {
return (
normalValidate && this.dectionForm.birthTime && this.dectionForm.sex
);
}
return normalValidate;
},
cardTypeName() {
const item = this.cardTypes.find(
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册