我刚刚升级到MUI 5.4版本,现在我的内联排版不再对齐。
这是我的代码,适用于MUI版本4:
<Grid container xs={12}>
<Grid container xs={12} justify="space-between" style={{borderBottom: "3px solid black"}}>
<Typography inline>Value</Typography>
<Typography inline align="right">{prodVol}MWh</Typography>
</Grid>
</Grid>我的猜测是,新的Grid存在一个问题,因为当我更改这个Import时,代码就停止工作了。
发布于 2022-02-07 07:50:55
正如在这个answer中所解释的,我只是用"justifyContent“替换了”“。
我的MUI V5工作代码:
<Grid container xs={12}>
<Grid container xs={12} justifyContent="space-between" style={{borderBottom: "3px solid black"}}>
<Typography inline>Value</Typography>
<Typography inline align="right">{prodVol}MWh</Typography>
</Grid>
</Grid>谢谢梅迪:)
https://stackoverflow.com/questions/71014828
复制相似问题