Navigation buttons not working
See original GitHub issueVue.js version and component version
Latest from NPM (4.1.1)
Reproduction Link
I can’t reproduce it when starting with the suggested fiddle link, which means it’s clearly on my end, but I could use some help
This is my configuration:
<template>
<swiper class="swiper" ref="slideSwiper"
:options="swiperOptions"
:auto-destroy="true"
:delete-instance-on-destroy="true"
:cleanup-styles-on-destroy="true">
<swiper-slide class="carousel-slide" v-for="(slide, i) in sliderSlides"
:key="'slide ' + i">
<img :src="$utils.getThumbnailUrl('xs', slide, false, true)" />
</swiper-slide>
<div class="swiper-button-next" slot="button-next"></div>
<div class="swiper-button-prev" slot="button-prev"></div>
</swiper>
</template>
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
import 'swiper/swiper-bundle.css';
export default {
components: {
Swiper,
SwiperSlide
},
data() {
return {
swiperOptions: {
//loop: true,
//loopedSlides: 5, // looped slides should be the same
spaceBetween: 30,
centeredSlides: true,
slidesOffsetBefore: '100px',
slidesOffsetAfter: '100px',
slidesPerView: 'auto',
touchRatio: 0.2,
slideToClickedSlide: true,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
}
}
}
}
}
The next/previous buttons show up properly, but have no click event bound to them for some reason. What am I doing wrong?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:22
- Comments:41
Top Results From Across the Web
What To Do If Android Home And Back Button Are Not Working
Fixes: Android Home and Back Button Not Working · 1. Use Third-Party Apps · 2. Force Restart the Device · 3. Wipe Cache...
Read more >Back button not working on Android? Try these 5 fixes!
If the back button is missing or not working on Android, check Navigation settings, wipe cache partition, or perform a factory reset.
Read more >How to fix Back Button/Home Button Not Working on Android ...
Android Back Button/Home Button Not Working [Fixed] · Restart your Device · Use a third-party menu(navigation) button App · Wipe Cache Partition ·...
Read more >9 Ways to Fix Home Button Not Working on Android - iMobie
Way 1. Restart Your Device ... One of the reasons your Home button is not working is that there is a minor bug...
Read more >5 Ways to fix the home button not working on Android - Carlcare
Step 1: Switch off the phone, and long-press the power button + Volume (down) button ; Step 2: Select 'Recovery' mode ; Step...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem here. This package currently works fine with Swiper v5 (i.e.
yarn add swiper@5.4.5
andimport "swiper/css/swiper.css"
). Swiper v6.0.0 and v6.0.1 seems to be not compatible so far with the broken navigation (at least).I solved the problem this way Define swiper globally with this code
import Vue from ‘vue’ import {Swiper as SwiperClass, Pagination, Navigation, Mousewheel, Autoplay} from ‘swiper/swiper.esm’ import getAwesomeSwiper from ‘vue-awesome-swiper/dist/exporter’
SwiperClass.use([Pagination, Mousewheel, Navigation, Autoplay]) Vue.use(getAwesomeSwiper(SwiperClass)) const {Swiper, SwiperSlide} = getAwesomeSwiper(SwiperClass)
// import style import ‘swiper/swiper-bundle.min.css’