-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
injection "swiper" not found. With useSwiper() #7215
Comments
I believe useSwiper can be used within a component which is inside the Swiper element slot |
Depending on your needs, you need to write a button component and import userwiper within the component |
I meet the same problems.please tell me have you deal with it? |
Use ref |
same problems |
All you have to do is to add the custom button (that uses |
component outside of swiper: component inside of swiper: |
use ref , it dosen't work, please show the code |
you can get the intance of swiper by afterInit event |
Check that this is really a bug
Reproduction link
https://stackblitz.com/edit/vitejs-vite-d4cq6o?file=src/App.vue
Bug description
I want to control the slide with a new button
so i use this hook useSwiper from
https://swiperjs.com/vue#use-swiper
the vue tip warn injection "swiper" not found.
Get undefined!
Expected Behavior
No response
Actual Behavior
No response
Swiper version
11.0.5
Platform/Target and Browser Versions
windows11 chrome
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: