我如何在反应中编写内容属性?

2 microdata typescript reactjs

这是我的代码

<div  itemProp={"offers"} itemScope  itemType={"http://schema.org/Offer"}>
        <span  itemProp="price" content="10.00">{10}</span>
 </div>
Run Code Online (Sandbox Code Playgroud)

我收到这个错误。

输入'{孩子:字符串;itemProp: 字符串;内容:字符串;}' 不能分配给类型 'DetailedHTMLProps, HTMLSpanElement>'。类型“DetailedHTMLProps, HTMLSpanElement>”上不存在属性“content”。

我认为问题是内容。

aqu*_*quz 5

React Typescript - 添加自定义属性

 <div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
          <span itemProp="price" {...{content: '10.00'}}>
            {10}
          </span>
  </div>
Run Code Online (Sandbox Code Playgroud)