我正在尝试使用 MJML 电子邮件库在 React 中创建电子邮件。它跑掉了反应,我已经全部工作了,但我需要渲染 2 个部分而不是 1 个。当我渲染 1 时,它不会正确显示在网页上,因为我需要它们的大小不同。
当我尝试将元素包装在数组中时,返回变为空,取出其中一个部分并返回。
任何帮助将不胜感激,这是代码。
render() {
const { mjAttribute } = this.props
const content = [this.renderEmailOverhead()]
const innerContent = [this.renderEmailBanner(), this.renderEmailTitle(), this.renderEmailText(), this.renderEmailDivider]
return ([
<Section full-width='full-width' padding-top="0">
{ content }
</Section>,
<Section>
{ innerContent }
</Section>
])
}