0

我收到此警告

警告:道具类型失败:提供给的道具color值无效,应为 ["primary","secondary"] 之一。inheritForwardRef(TextField)

我尝试将颜色从继承更改为主要并更改,并且我已更改 import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider'; “@material-ui/core/styles”导入 { ThemeProvider as MuiThemeProvider };错误仍然相同

4

2 回答 2

0

降级dependencY文件为我工作,我将package.json从

“依赖”:{“@material-ui/core”:“^4.6.1”,“@material-ui/icons”:“^4.5.1”,}

to "dependencies": { "@material-ui/core": "~4.5.1", "@material-ui/icons": "^4.5.1",} 现在工作正常

于 2019-11-19T08:43:14.590 回答
0

看起来这是由最近更新 Material-ui 模块引起的问题。这对我有用 https://github.com/mbrn/material-table/issues/1293#issuecomment-558972419

于 2019-12-04T09:54:31.413 回答