1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- define([
- 'text!./index.html',
- 'swiper'
- ], function(html, Swiper) {
- return {
- props: {
- recommend: {
- type: Object,
- default: function () {
- return {};
- }
- },
- rankList: {
- type: Array,
- default: function () {
- return [];
- }
- },
- goodList: {
- type: Array,
- default: function () {
- return [];
- }
- },
- newList: {
- type: Array,
- default: function () {
- return [];
- }
- }
- },
- watch: {
- goodList: function () {
- var vm = this;
- this.$nextTick(function () {
- this.swiper = new Swiper('.swiper-container', {
- slidesPerView: 'auto',
- spaceBetween: 10,
- centeredSlides: true,
- initialSlide: 1,
- autoplay: true,
- loop: true,
- // loopedSlides: 4,
- observer: true,
- observeParents: true,
- observeSlideChildren: true
- });
- });
- }
- },
- mounted: function () {
-
- },
- methods: {
- },
- template: html
- };
- });
|