问题描述:
在组件库开发组件的时候遇到 antd 的 DatePicker 和 RangePicker 组件 ts 错误提示 “DatePicker”不能用作 JSX 组件 。
如图所示:
解决方案:
把 DatePicker 和 RangePicker 组件定义为 any 类型即可。