swiper
swiper copied to clipboard
vue3 ts swiper module component props, Type 'true' cannot be assigned to type 'undefined'
Check that this is really a bug
- [X] I confirm
Reproduction link
https://codesandbox.io/s/friendly-chihiro-nqj9n
Bug description
<script setup lang="less">
import { Swiper, SwiperSlide } from "swiper/vue";
import { FreeMode, Scrollbar } from "swiper";
import "swiper/css";
import "swiper/css/free-mode";
import "swiper/css/scrollbar";
</script>
<template>
<Swiper
:modules="[FreeMode, Scrollbar]"
freeMode
scrollbar
>
// ......
</Swiper>
</template>
Expected Behavior
There are some effects. Errors are not reported during development, but errors are reported during build
Actual Behavior
No response
Swiper version
7.3.1
Platform/Target and Browser Versions
chrome 96.0.4664.45
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- [X] Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- [ ] I'm willing to open a PR
also got the same issues, seems like this happen because the default value of the prop is undefined where as the proptype is xxOptions | boolean
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.