You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
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
|
|
};
|
|
}); |