Closed chenbj123 closed 4 years ago
这个报错的问题是在material-ui用了低版本的type declaration,引起的解决方案是升级@material-ui的2个库。
检查下你的 @material-ui 2个库的版本是不是4.9.1 "@material-ui/core": "4.9.1", "@material-ui/icons": "4.9.1",
使用以下的命令 重新安装一下依赖
cd 到你的web项目目录
rm -rf package-lock.json && rm -rf node_modules && npm cache verify && npm i --registry=https://registry.npm.taobao.org/
E:/zxdzWorkspace/education_web/src/components/form-input.tsx TypeScript error in E:/zxdzWorkspace/education_web/src/components/form-input.tsx(32,8): Type '{ children: never[]; className: string; value: any; onChange: (evt: any) => void; }' is not assignable to type 'IntrinsicAttributes & InputProps'. Property 'children' does not exist on type 'IntrinsicAttributes & InputProps'. TS2322