首页 > 解决方案 > 打字稿错误:类型中缺少属性“htmlType”

问题描述

升级到 typescript 3.0.1 和 antd 3.8.0 后,我有下一个编译错误:类型 '{ children: Element; 中缺少属性 'htmlType' id:字符串;类名:字符串;形状:“圆形”;}'。

<Button id="goToTopButton" className="scroll-to-top-button" shape="circle">
                        <i className="material-icons">arrow_upward<i/>
</Button>

以及其他组件(如 Modal 等)的类似错误。有没有人可以帮助解决它?

标签: reactjstypescriptantd

解决方案


推荐阅读