typescript中使用antd.form.create


typescript中使用antd.form.create

报错内容如下

与类型“IntrinsicAttributes & IntrinsicClassAttributes<Component<Pick<FormComponentProps

  • 解决办法如下:
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)



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM