我正在使用Semantic-UI中的Card组件。我事先不知道要渲染多少张牌。我想在卡片的内侧面之间设置边框,类似于Grid中的边框。这是一种优雅的方式吗?
这是我的代码:
renderCategoryCards(){
return this.props.grid.map((grid_cat) => {
return ( <CategoryCard key={grid_cat._id} category={grid_cat}/> )
})
}
render() {
return (
<div className="categories-wrapper">
<Card.Group itemsPerRow={3} stackable>
{this.renderCategoryCards()}
</Card.Group>
</div>
);
}
答案 0 :(得分:0)
render() { return ( <Grid className="categories-wrapper" celled='internally' container stackable centered columns='equal'> {this.generateRows()} </Grid> ); } }