<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>
