报错:TypeError: _form.default.create(...) is not a function
报错:
原因:
antd版本更新,我用的是3.x的老版本。
Ant Design 4.0 对Form进行了修改,已经不使用 Form.create,也不需要使用了,它会自动验证,移除了原来的onSubmit,改用onFinish。
解决:
更改package.json的antd版本为3.26.14
执行> cnpm install
重新运行> npm start
antd版本更新,我用的是3.x的老版本。
Ant Design 4.0 对Form进行了修改,已经不使用 Form.create,也不需要使用了,它会自动验证,移除了原来的onSubmit,改用onFinish。
更改package.json的antd版本为3.26.14
执行> cnpm install
重新运行> npm start