tsComponentPropsWithRef获取一个组件的类型,如果有ref,也获取ref类型,所以如果想获取这个组件的ref类型可以使用: React.ComponentPropsWithRef< typeof WrappedComponent>['ref']