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.
 
 
 
 

49 lines
754 B

<template>
<swiper
:autoplay="autoplay"
:interval="interval"
:circular="circular"
style="height: 34rpx;"
:duration="duration"
:vertical="true"
>
<swiper-item v-for="(item,i) in list" :key="i">
<view @click="toArticleDetail(item.id)">{{item.title}}</view>
</swiper-item>
</swiper>
</template>
<script>
export default{
props:{
list: {
type: Array,
default: []
},
duration: {
type: Number,
default: 1500
},
interval: {
type: Number,
default: 5000
},
circular: {
type: Boolean,
default: true
},
autoplay: {
type: Boolean,
default: true
},
},
methods:{
toArticleDetail(id){
this.$emit('toArticleDetail',id)
}
}
}
</script>
<style>
</style>