computed: {swiper() {return this.$refs.mySwiper.swiper}methods(){a(){//用swiper实例this.swiper}}
如果直接在a方法中用this.$refs.mySwiper.swiper,会有点区别(?)
更详细的内容参见:http://blog.csdn.net/heliumlau/article/details/71085593还有一点,你在你的css里需要引入swiper的css,不然没法滚动。
本文共 558 字,大约阅读时间需要 1 分钟。
computed: {swiper() {return this.$refs.mySwiper.swiper}methods(){a(){//用swiper实例this.swiper}}
如果直接在a方法中用this.$refs.mySwiper.swiper,会有点区别(?)
更详细的内容参见:http://blog.csdn.net/heliumlau/article/details/71085593还有一点,你在你的css里需要引入swiper的css,不然没法滚动。
转载于:https://www.cnblogs.com/xiaochongchong/p/7762179.html