Javascript 如何在Vue.JS中使用缩略图滑动转盘
我正在使用作为缩略图旋转木马,就像这样,一切都很好,但不仅仅是基于单击的更改,就像我单击缩略图时不更改主旋转木马一样 下面是我的示例代码 模板:Javascript 如何在Vue.JS中使用缩略图滑动转盘,javascript,vue.js,slick.js,Javascript,Vue.js,Slick.js,我正在使用作为缩略图旋转木马,就像这样,一切都很好,但不仅仅是基于单击的更改,就像我单击缩略图时不更改主旋转木马一样 下面是我的示例代码 模板: <slick ref="slick" :options="slickOptions" :asNavFor = "$refs.slick2" > <a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1
<slick
ref="slick"
:options="slickOptions"
:asNavFor = "$refs.slick2"
>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
</slick>
<slick
ref="slick2"
:options="slickOptions2"
:asNavFor = "$refs.slick"
>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<a href="http://placehold.it/2000x1000"><img src="http://placehold.it/2000x1000" alt=""></a>
<button class="prev-arrow slick-arrow">
<feather type="arrow-left"></feather>
</button>
<button class="next-arrow slick-arrow">
<feather type="arrow-right"></feather>
</button>
</slick>
我需要怎么做
谢谢
export default {
name: 'app',
components: { Slick },
data() {
return {
slickOptions: {
speed: 300,
slidesToShow: 1,
slidesToScroll: 1,
cssEase: 'linear',
fade: true,
autoplay: true,
draggable: true,
prevArrow: '.client-feedback .prev-arrow',
nextArrow: '.client-feedback .next-arrow'
},
slickOptions2: {
speed: 300,
slidesToShow: 5,
slidesToScroll: 1,
cssEase: 'linear',
autoplay: true,
centerMode: true,
draggable: false,
focusOnSelect: true,
prevArrow: '.client-thumbnails .prev-arrow',
nextArrow: '.client-thumbnails .next-arrow',
},
};
},
methods: {
next() {
this.$refs.slick.next();
},
prev() {
this.$refs.slick.prev();
}
}
}