From 1b5f6caa41eb6d73ba1aeb85818e7479b3326ffd Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Wed, 23 Nov 2022 10:08:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=80=91Tab=E9=A3=8E=E6=A0=BC=20=E4=B8=80=E5=AF=B9=E5=A4=9A?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E6=A0=A1=E9=AA=8C=E4=B8=8D=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8F=90=E4=BA=A4=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=A9=BA=E7=99=BD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/system/useJvxeMethods.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hooks/system/useJvxeMethods.ts b/src/hooks/system/useJvxeMethods.ts index 5d94b42..f5262d5 100644 --- a/src/hooks/system/useJvxeMethods.ts +++ b/src/hooks/system/useJvxeMethods.ts @@ -44,7 +44,7 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs, getAllTable() .then((tables) => { let values = formRef.value.getFieldsValue(); - return validateFormModelAndTables(formRef.value.validate, values, tables, formRef.value.getProps); + return validateFormModelAndTables(formRef.value.validate, values, tables, formRef.value.getProps, false); }) .then((allValues) => { /** 一次性验证一对一的所有子表 */ @@ -61,7 +61,13 @@ export function useJvxeMethod(requestAddOrEdit, classifyIntoFormData, tableRefs, .catch((e) => { if (e.error === VALIDATE_FAILED) { // 如果有未通过表单验证的子表,就自动跳转到它所在的tab - activeKey.value = e.index == null ? unref(activeKey) : refKeys.value[e.index]; + //update-begin-author:taoyan date:2022-11-22 for: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题 + if(e.paneKey){ + activeKey.value = e.paneKey + }else{ + activeKey.value = e.index == null ? unref(activeKey) : refKeys.value[e.index]; + } + //update-end-author:taoyan date:2022-11-22 for: VUEN-2866【代码生成】Tab风格 一对多子表校验不通过时,点击提交表单空白了,流程附加页面也有此问题 } else { console.error(e); }