Commit 4320b0ed by haojie

优化form表单

parent 057391f4
......@@ -10,7 +10,7 @@ export default defineComponent({
setup(props, { emit, slots }) {
const newRule = ref<any>({});
const ewriteRules = () => {
const { data, rules } = props;
const { rules } = props;
Object.keys(rules).forEach((key: string) => {
rules[key].forEach((item: any) => {
// 是否显示error
......@@ -58,7 +58,9 @@ export default defineComponent({
if (formValidation(rule, data[key])) {
rule.leShow = false;
} else {
// 只显示一条error
rule.leShow = true;
break;
}
}
}
......@@ -96,7 +98,7 @@ export default defineComponent({
}
}
}
// 通知tab_panel
// 通知
emit('submit', {
result: status,
firstError: message[0],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment