我需要销毁桌面上的 vue-awesome-swiper 并留在平板电脑屏幕上。完全销毁,而不是禁用滑动。但是我可以摧毁 swiper 吗?在指令 :options 中,我传递了参数,并且组件标签 swiper 在任何情况下都将起作用。只有没有传递的参数
<template lang="pug">
.app
swiper(:options="swiperOptions")
swiper-slide(
v-for="(slide, idx) in slides"
:key="idx"
)
<script>
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
name: 'MySlider',
components: {
swiper,
swiperSlide
},
data() {
return {
slides: [
{
title: 'Заголовок 1',
img: 'title.jpg',
},
{
title: 'title2',
img: 'slide2.jpg',
},
{
title: 'title3',
img: 'slide3.jpg',
}
],
swiperOptions: {
slidesPerView: 5,
spaceBetween: 21,
// allowTouchMove: false,
breakpoints: {
992: {
slidesPerView: 3,
spaceBetween: 25,
},
768: {
slidesPerView: 3.7,
spaceBetween: 22,
},
640: {
slidesPerView: 2.2,
spaceBetween: 15,
initialSlide: 0,
centeredSlides: false,
}
},
},
}
},