
这个是写在 data 里面的 swiperOption: { direction: 'vertical', slidesPerView: 1, spaceBetween: 300, mousewheel: true, loop:true, pagination: { el: '.swiper-pagination', type: 'bullets', clickable: true }, on:{ // 使用 es6 的箭头函数,使 ths 指向 vue 对象 slideChange: ()=>{ let aswiper = this.$refs.mySwiper.swiper;
// this.$nextTick(() => { 我想用滚轮获取它当前的索引 但用 $nextTick 事件的时候,报错: "TypeError: Cannot read property 'activeIndex' of null" 应该是生命周期的原因,但是写在 methods 里面去也是报错,直接页面错误