【发布时间】:2021-08-02 20:31:47
【问题描述】:
我正在使用模板文字在反应中显示我的数据,但我想设置该电子邮件的样式,我怎样才能在该模板文字上应用内联样式,有没有可能做到这一点?
{`${eachCustomer?.name} <${eachCustomer?.email}>`}
【问题讨论】:
-
需要放入您所设计的另一个元素,例如
<span> -
你好,我正在使用材料 ui,这是我的代码
<TreeItem nodeId={eachCustomer?._id} label={`${eachCustomer?.name} <${eachCustomer?.email}>`} >,我想显示一个像 abc-user这样的标签
标签: javascript css reactjs frontend template-literals