我使用v5版的swiper,提示The children of Swiper
must be Swiper.Item
components,源码类型判断出错,求解决
#5288
Unanswered
chenmeiling1997
asked this question in
Q&A
Replies: 2 comments 1 reply
-
但看截图是没问题的,要么在 codesandbox 或 stackblitz 写个复现 demo? |
Beta Was this translation helpful? Give feedback.
0 replies
-
遇到同一个问题,有解决吗? @chenmeiling1997 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
项目代码如下:



控制台提示如下:
我查看源码得知在swiper.js会判断,child类型,于是添加日志,发现问题如下:

我发现swiper里面获取到的
Swiper.Item
标签类型,与定义的类型匹配不上这里获取到的type是ProxyFacade(props, context),所以报错
请问是我的用法写错了吗,还是什么原因呢
Beta Was this translation helpful? Give feedback.
All reactions