我从 Material-UI v4 迁移到 v5。现在,无论我尝试渲染基于 Material-UI 的组件,我都会收到此错误:
You seem to be using a value for 'content' without quotes, try replacing it with `content: '""'`
Run Code Online (Sandbox Code Playgroud)
这似乎是由 v5使用的新样式库 Emotion 引起的。
我发现了一个关于 Emotion 的Github 问题讨论了这个错误,但它对我没有帮助。我不应该去摆弄 MUI 如何使用 Emotion,对吧?我希望这种复杂性对我来说是隐藏的。
有想法该怎么解决这个吗?
mrw*_*t10 33
我需要改变:
MuiInputBase: {
root: {
"&:after": {
content: "", <--------
display: "table",
clear: "both",
},
},
},
Run Code Online (Sandbox Code Playgroud)
到
MuiInputBase: {
root: {
"&:after": {
content: '""', <----------
display: "table",
clear: "both",
},
},
},
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5751 次 |
| 最近记录: |