【问题标题】:React typescript type error with react-spring使用 react-spring 反应打字稿类型错误
【发布时间】:2021-08-30 19:57:58
【问题描述】:

我在尝试为圆圈分配样式时遇到错误。 我正在使用react-spring

My code

错误 >

【问题讨论】:

    标签: reactjs typescript react-spring


    【解决方案1】:

    cx 和 cy 属性应该被支持作为 CSS 属性,但它们似乎在 typescript 定义中丢失了。也许缺乏浏览器支持?您可以将它们从 css 更改为元素属性,这样您就可以摆脱错误消息。

     <a.circle cx={maskedCircleProps.cx} cy={maskedCircleProps.cy} r="9" fill="black" />
    

    【讨论】:

      猜你喜欢
      • 2017-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-08
      • 2019-05-02
      • 2021-09-11
      • 2018-03-27
      • 2017-06-24
      相关资源
      最近更新 更多