简体   繁体   English

在 Material v5 中使用 X 网格

[英]Using X-grid in Material v5

I started building an react app using the new v5 alpha material-ui According to their documentation 'The data grid components are supporting v5 and v4'.我开始使用新的 v5 alpha material-ui构建一个 react 应用程序,根据他们的文档“数据网格组件支持 v5 和 v4”。 So I installed the X-grid and when I import the X-grid I get this error:所以我安装了 X-grid,当我导入 X-grid 时出现这个错误:

./node_modules/@material-ui/x-grid/dist/index-esm.js ./node_modules/@material-ui/x-grid/dist/index-esm.js

Module not found: Can't resolve '@material-ui/styles' in 'C:\\Users\\remusp\\Desktop\\React\\material\\node_modules@material-ui\\x-grid\\dist'找不到模块:无法解析“C:\\Users\\remusp\\Desktop\\React\\material\\node_modules@material-ui\\x-grid\\dist”中的“@material-ui/styles”

Does anyone know how to make this work together?有谁知道如何使这个工作一起工作?

so you can install material/styles所以你可以安装材料/样式

npm install @material-ui/styles

sometimes the packages comes splited, so if you will use all material-ui install all lib有时包会被拆分,所以如果你将使用所有材料-ui 安装所有库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM