答案 0 :(得分:0)
查看徽章组件的源代码,它将子/子节点放在徽章内容之前。
来自the src:
<div {...other} style={prepareStyles(Object.assign({}, styles.root, style))}>
{children}
<span style={prepareStyles(Object.assign({}, styles.badge, badgeStyle))}>
{badgeContent}
</span>
</div>
示例:
<Badge
badgeContent={'Hello'}
children={'Something before the content.'}
/>
将呈现如下: