Combo 下 Table 支持服务端校验 (#1432)

This commit is contained in:
RickCole 2021-01-22 20:36:25 +08:00 committed by GitHub
parent 764e7af55c
commit 56fa20ed27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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];
}
}

View File

@ -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];
}
};
})