我必須將使用地圖函式渲染的組件水平對齊,因為它默認是垂直對齊的。
下面是我的組件:
<Table.Cell>
{[...Array(this.props。 numPages)].map((e, i) => /span> (
<Typography customLink onClick={()/span> => this. handlePageClick(i 1)} key={'key'.concat(i)} className='page'>
{i 1}
</Typography>
))}
</Table.Cell>
這里的Typography是必須被呈現為頁碼的組件,但它被垂直呈現了。
下面是我使用的css:
.pages{
display: flex;
flex-direction: horizontal;
}
如果有任何幫助,我們將不勝感激。
這是個需要柔性的包裝器,而水平方向的柔性并不存在......
也許可以用這個試試。
也許可以試試這個:
<Table.Cell>
<div style={{display:'flex', flexDirection:'row'}}>
{[...Array(this.props.numPages)].map((e, i) =>/span> (
<Typography customLink onClick={() => this.handlePageClick(i 1)} key={'key'.concat(i)} className='pages' >
{i 1}。
</Typography>
))}
</div>
</Table.Cell>
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/306593.html
標籤:
上一篇:TAPD自定義研發流程案例
