首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何使用react intl.formatMessage?

如何使用react intl.formatMessage?
EN

Stack Overflow用户
提问于 2018-10-10 00:25:13
回答 1查看 0关注 0票数 0

我有这个代码

<EuiEmptyPrompt
    iconType="securityApp"
    iconColor={null}
    body={intl.formatMessage({
      id: "someId",
      defaultMessage: "Some text {value}"
    })
/>

我需要插入p标签(insted of value)。怎么做?

我尝试这样做:

    body={intl.formatMessage({
      id: "someId",
      defaultMessage: "Some text {value}",
      values: { value: <p>some new text</p> }
    })

但它不起作用。该怎么办?

EN

回答 1

Stack Overflow用户

发布于 2018-10-10 10:09:24

如何使用FormattedHTMLMessage

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100002867

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档