TS React组件自定义属性的定义及使用

TaxesTable组件 定义的接口上没有type 属性,为什么呢?  其实我这里自己挖了个坑。我的TaxesTable里面是用Form.create去包裹了一层,Form.create()(Index)所以我们要给Form.create传一个泛型

 这是我去查了Form.create是怎么定义接口的  意思是要先定义一个继承于FormComponentProps 的接口 

interface F extends FormComponentProps {
  type?:string
}

然后在Form.create<F>()(Index)

原文地址:https://www.cnblogs.com/MDGE/p/14484893.html