typescript中使用antd.form.create
<p>typescript中使用antd.form.create</p><h4 id="报错内容如下">报错内容如下</h4>
<p>与类型“IntrinsicAttributes & IntrinsicClassAttributes<Component<Pick<FormComponentProps</any></p>
<ul>
<li>解决办法如下:</li>
</ul>
<pre><code>1 import {FormComponentProps} from 'antd/lib/form/Form';
2 interface CreateNoticeModalProps extends FormComponentProps {
isShow: boolean
onCancel: any
onOk: any
}
3 class Test extends React.Component<CreateNoticeModalProps{}> {}
4 最关键的
export default Form.create<CreateNoticeModalProps>()(CreateNoticeModal)
</code></pre><br><br>
来源:https://www.cnblogs.com/huangxingyuan/p/10819924.html
頁:
[1]