开发者社区 问答 正文

Typescript错误:无法分配给类型'IntrinsicAttributes‘。类型“”Intr

Typescript错误:无法分配给类型'IntrinsicAttributes‘。类型“”IntrinsicAttributes“”上不存在属性“”children“”

展开
收起
huahuahu 2022-12-24 18:36:31 1306 分享 版权
1 条回答
写回答
取消 提交回答
  • 好对react元素使用React.ReactNode类型,因为它也适用于元素数组。只需更改您的类型。

    children: JSX.Element;
    
    2022-12-24 23:17:54
    赞同 展开评论
问答分类:
问答地址: