react中的content属性怎么写?
How do I write the content attribute in react?
这是我的代码
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" content="10.00">{10}</span>
</div>
我收到这个错误。
Type '{ children: string; itemProp: string; content: string; }' is not assignable to type 'DetailedHTMLProps, HTMLSpanElement>'.
Property 'content' does not exist on type 'DetailedHTMLProps, HTMLSpanElement>'.
我觉得是内容的问题
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" {...{content: '10.00'}}>
{10}
</span>
</div>
这是我的代码
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" content="10.00">{10}</span>
</div>
我收到这个错误。
Type '{ children: string; itemProp: string; content: string; }' is not assignable to type 'DetailedHTMLProps, HTMLSpanElement>'. Property 'content' does not exist on type 'DetailedHTMLProps, HTMLSpanElement>'.
我觉得是内容的问题
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" {...{content: '10.00'}}>
{10}
</span>
</div>