嗨,出于某種原因,這不起作用
let ifAID = "Banco: Global Bank\nTipo de Cuenta: Corriente"
\n應該在哪里換行,這是炫耀的東西,有什么建議嗎?

我在容器內的盒子中使用 Card、CardContent、Typography 和 Stack(有很多事情要做)

<Box pl={50} mb={2} sx={{width: "480px", justifyContent: 'center'}}>
<Stack>
<Card >
<CardContent >
<Typography variant = "h5" gutterBottom>
Transferencia Bancaria (ACH)
</Typography>
<Typography variant="h6">
{ifAID}
</Typography>
<Typography>
*Presentar comprobante de pago para retirar libros*
</Typography></CardContent></Card></Stack></Box>
uj5u.com熱心網友回復:
ah6不處理換行符。您可能想要使用<pre>標簽。
在你的情況下,它會變成
<Typography variant="h6" component="pre">
{ifAID}
</Typography>
更多關于pre標簽:https : //developer.mozilla.org/en-US/docs/Web/HTML/Element/pre
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/354900.html
下一篇:ReactJS使用路徑匯入SVG
