查看: 1758|回复: 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'.

下载.png

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-19 05:39 , Processed in 0.067134 second(s), 33 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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