查看: 1759|回复: 0
打印 上一主题 下一主题

react中使用swiper,ts报错

[复制链接]

该用户从未签到

1

主题

1

帖子

5

积分

新手上路

Rank: 1

积分
5
跳转到指定楼层
楼主
发表于 2021-1-13 13:32:27 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
/Users/mac/gat/eap-web/node_modules/swiper/swiper-react.d.ts
ERROR in /Users/mac/gat/eap-web/node_modules/swiper/swiper-react.d.ts(6,11):
TS2430: Interface 'Swiper' incorrectly extends interface 'Pick<HTMLAttributes<HTMLElement>, "className" | "slot" | "style" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 239 more ... | "onTransitionEndCapture">'.
  Types of property 'onKeyPress' are incompatible.
    Type '(swiper: Swiper, keyCode: string) => void' is not assignable to type '(event: KeyboardEvent<HTMLElement>) => void'.



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Swiper中文网 ( 粤ICP备15001020号

GMT+8, 2024-4-20 00:30 , Processed in 0.067204 second(s), 30 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表