From 56fa20ed276f99f10792c01b1f0e1d0891c84114 Mon Sep 17 00:00:00 2001 From: RickCole Date: Fri, 22 Jan 2021 20:36:25 +0800 Subject: [PATCH] =?UTF-8?q?Combo=20=E4=B8=8B=20Table=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E6=A0=A1=E9=AA=8C=20(#1432)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/form.ts | 2 +- src/store/formItem.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/form.ts b/src/store/form.ts index 9e9abea71..810244e50 100644 --- a/src/store/form.ts +++ b/src/store/form.ts @@ -290,7 +290,7 @@ export const FormStore = ServiceStore.named('FormStore') const items = getItemsByPath(key); if (Array.isArray(items) && items.length) { - items.forEach(item => item.setError(errors[key])); + items.forEach(item => item.setError(`${errors[key]}`)); delete errors[key]; } } diff --git a/src/store/formItem.ts b/src/store/formItem.ts index 3f09656af..cb30615c5 100644 --- a/src/store/formItem.ts +++ b/src/store/formItem.ts @@ -212,6 +212,11 @@ export const FormItemStore = StoreNode.named('FormItemStore') }); return selectedOptions; + }, + getItemsByName(name: string): any { + return (this as any).type === 'table' + ? [this.subFormItems[name]] + : [this]; } }; })