Closed pointhalo closed 2 years ago
因为 BaseFormApi的定义是这样写的,继承自 Record<string, unknown>
interface FData { test: boolean; test2: boolean; test3: string; // [x: string]: unknown; } class Demo extends React.Component<IProps> { constructor(props:any) { super(props); this.state = { visible: false}; } getFormApi(formApi: FormApi<FData>) { formApi.getValue('') } render() { const { visible } = this.state; return ( <> <Form getFormApi={this.getFormApi}> </Form> </> ); } }
为啥关了呀,是已经修了吗?感觉这个严重影响 ts 开发者的使用
在2.14.0已更新
Which Component Need Enhancement 期望新增功能的组件
What does the proposed API look like 期望支持的API
Feature Description 功能描述
因为 BaseFormApi的定义是这样写的,继承自 Record<string, unknown>
Additional information 补充说明