我想在我的 React tsx (TypeScript) Web 應用程式中的新行上設定用戶名。
entry.comment包含以下字串:jsdkjfdjsfds
entry.username包含以下字串:Noah
我的代碼看起來像這樣,我嘗試過,\n但這不起作用:
<div className={classes.entryContent}>
<Typography className={classes.entryContentParagraph} variant="body2" paragraph={true}>
<ReactMarkdown>
{entry.comment "\n" entry.username}
</ReactMarkdown>
</Typography>
</div>

你有什么建議嗎?保持新鮮!
uj5u.com熱心網友回復:
根據這個問題和降價轉換

會給你

但是這個

會給你

uj5u.com熱心網友回復:
由于我沒有足夠的聲譽,因此我必須將其添加到答案中。
我以前沒有使用過這個庫,但你能不能嘗試添加斷行標記,比如<br />.
uj5u.com熱心網友回復:
<div className={classes.entryContent}>
<Typography className={classes.entryContentParagraph} variant="body2" paragraph={true}>
<ReactMarkdown>
<p>{entry.comment}</p>
<p>{entry.username}</p>
</ReactMarkdown>
</Typography>
</div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/316881.html
