From 5ddf904d5abbae9713c2e1e7b861aadc9b373aef Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期五, 11 十月 2024 10:40:06 +0800 Subject: [PATCH] 复原多提交的api index文件 --- src/components/form/FYForm.vue | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/components/form/FYForm.vue b/src/components/form/FYForm.vue index 07fde84..9c5405e 100644 --- a/src/components/form/FYForm.vue +++ b/src/components/form/FYForm.vue @@ -69,13 +69,6 @@ required: true, message: '琛屾斂鍖哄垝涓嶈兘涓虹┖', trigger: 'change' - // validator: (rule, value, callback) => { - // if (!value) { - // callback(new Error('Please input the age')); - // } else { - // callback() - // } - // } } ], _scenetype: [ @@ -83,13 +76,6 @@ required: true, message: '鍦烘櫙绫诲瀷涓嶈兘涓虹┖', trigger: 'change' - // validator: (rule, value, callback) => { - // if (!value) { - // callback(new Error('Please input the age')); - // } else { - // callback() - // } - // } } ] }); @@ -155,8 +141,19 @@ ); //鐩戝惉琛ㄥ崟缂栬緫鐘舵�� -watch(edit, (nValue) => { - emit('update:isEdit', nValue); +watch( + () => props.isEdit, + (nV, oV) => { + if (nV != oV) { + edit.value = nV; + } + }, + { immediate: true } +); +watch(edit, (nV, oV) => { + if (nV != oV) { + emit('update:isEdit', nV); + } }); defineExpose({ formObj, onSubmit, onCancel, onReset }); -- Gitblit v1.9.3