Object
null
Slider configuration
{
currentPage: 0,
thresholdDistance: 500,
thresholdTime: 100,
autoplay:1000,
loop:true,
direction:'vertical',
loopedSlides:1,
slidesToScroll:1
}
string
slide
Switching effect,it Could be slide
, fade
, coverflow
, nest
{
effect:'slide'
}
string
horizontal
Direction setting,it Could be horizontal
or vertical
(for vertical slider)
{
direction:'horizontal'
}
number
0
Initing current Page of slider
{
currentPage:0
}
number
100
Minimal distance (in px) to trigger swipe to next/previous slide during swipes
{
thresholdDistance:'100'
}
number
500
Minimal speed (in ms) to trigger swipe to next/previous slide during swipes
{
thresholdTime:'500'
}
number
number[ms]
delay between transitions (in ms).
{
autoplay:'1000'
}
boolean
false
Set to true to enable continuous loop mode
{
loop:false
}
number
1
like carousel, works with multiple slides
{
loopedSlides:1
}
number
1
slides scrolled at once
{
slidesToScroll:1
}
boolean
false
When the touch event is triggered, the entire page scrolls
{
preventDocumentMove:true
}
number[ms]
300
Sliding speed[ms]
{
speed: 300
}
string
ease
Sliding mode
{
timingFunction: 'ease'
}
boolean
true
Whether paging is displayed in all modes
{
pagination: true
}
function
null
createElement, index
Custom paging function, the parameter is VUE's createElement function, and the current page number index
{
renderPagination: (h, index) => {
return h('div', {
class: 'swiper-pagination-bullet'
}, [index])
}
}
boolean
false
Whether to slide in the middle
{
centeredSlides: true
}
boolean
false
Use itemAnimation in infinite scrolling to ensure that the last one to the first (first to last) effect ends before you can continue to slide
{
itemAnimation: true
}
boolean
false
Prevent Slider sliding
{
freeze: false
}
boolean
false
Stop rebound
{
preventRebound: false
}
string
0.8
Coverflow mode configuration width scale scaling, range 0~1
{
widthScalingRatio: '0.8'
}
string
0.8
Coverflow mode configuration hight scale scaling, range 0~1
{
heightScalingRatio: '0.8'
}
string
200
Configuration of sliding item offset in coverflow mode
{
deviation: '200'
}
boolean
true
When nesting the same direction of the swiper, when the child swiper is switched, the parent swiper will switch.
{
nested: false
}
number
Sliding to (number) page
slideTo () {
this.$refs.slider.$emit('slideTo', num)
}
null
Sliding to the next page
slideNext () {
this.$refs.slider.$emit('slideNext')
}
null
Sliding to the previous page
slide () {
this.$refs.slider.$emit('slidePre')
}
ms
Opening timing carousel,Setting the carousel time
this.$refs.slider.$emit('autoplayStart',1000)
Pause timing carousel
this.$refs.slider.$emit('autoplayStop')
obj
The current sliding to page number, the parameter is slider basic information
slide (data) {
console.log(data)
}
obj
initted slider , and the parameters are slider basic information
init (data) {
console.log(data)
}
obj
tapped on page , and the parameters are slider basic information
tap (data) {
console.log(data)
}