plutoless / eEducation

e-education solutions(Agora Reference Design)
184 stars 124 forks source link

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 30 | <> 31 | <InputLabel>{props.Label}</InputLabel> > 32 | <Input className={classes.formInput} value={props.value} | ^ 33 | onChange={onChange}> 34 | </Input> 35 | {props.requiredText ? <Typography className={classes.required}>{props.requiredText}</Typography> : null} #123

Closed chenbj123 closed 4 years ago

chenbj123 commented 4 years ago

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

30 |     <>
31 |       <InputLabel>{props.Label}</InputLabel>

32 | <Input className={classes.formInput} value={props.value} | ^ 33 | onChange={onChange}> 34 | 35 | {props.requiredText ? {props.requiredText} : null}

Matrixbirds commented 4 years ago

It seems ur material-ui dependencies using old type declaration. Pls check it version at least above 4.9.1

chenbj123 commented 4 years ago

It seems ur material-ui dependencies using old type declaration. Pls check it version at least above 4.9.1 改成 "@material-ui/core": "^4.9.13",也不行啊

Matrixbirds commented 4 years ago

您可以清理一下您这里的包管理缓存 rm -rf node_modules && npm cache verify 然后再npm install一下