diff --git a/packages/next/src/__builtins__/mapStatus.ts b/packages/next/src/__builtins__/mapStatus.ts index 0f170eeb2f1..15fb5b9c03a 100644 --- a/packages/next/src/__builtins__/mapStatus.ts +++ b/packages/next/src/__builtins__/mapStatus.ts @@ -1,11 +1,11 @@ -import { GeneralField } from '@formily/core' +import { Field } from '@formily/core' -export const mapStatus = (props: any, field: GeneralField) => { +export const mapStatus = (props: any, field: Field) => { const takeStatus = () => { if (!field) return - if (field['loading'] || field['validating']) return 'loading' - if (field['invalid']) return 'error' - if (field['warnings']?.length) return 'warning' + if (field.loading || field.validating) return 'loading' + if (field.selfErrors?.length) return 'error' + if (field.selfWarnings?.length) return 'warning' return field.decoratorProps?.feedbackStatus } const takeState = (state: string) => {