diff --git a/packages/form/src/components/Dependency/index.tsx b/packages/form/src/components/Dependency/index.tsx index 5063bcfa92fb..fb0ec398fa64 100644 --- a/packages/form/src/components/Dependency/index.tsx +++ b/packages/form/src/components/Dependency/index.tsx @@ -13,21 +13,21 @@ declare type RenderChildren = ( form: ProFormInstance, ) => React.ReactNode; -export type ProFormDependencyProps = Omit< +export type ProFormDependencyProps> = Omit< FormItemProps, 'name' | 'noStyle' | 'children' | 'label' > & { name: NamePath[]; ignoreFormListField?: boolean; - children: RenderChildren; + children: RenderChildren; }; -const ProFormDependency: React.FC = ({ +const ProFormDependency = ({ name: names, children, ignoreFormListField, ...rest -}) => { +}: ProFormDependencyProps) => { const context = useContext(ProFormContext); // ProFromList 的 field,里面有name和key const formListField = useContext(FormListContext);