<template>
	<swiper class="screen-swiper square-dot" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500">
	  <swiper-item @click="handler(index)" v-for="(item,index) in value" :key="index">
	    <image  :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
	    <video  :src="item.url" autoplay loop muted show-play-btn="false" controls="false" objectFit="cover" v-if="item.type=='video'"></video>
	  </swiper-item>
	</swiper>
</template>

<script>
	export default {
		props:{
			value:{type:Array,default:()=>([])}
		},
		data(){
			return {
				
			}
		},
		methods:{
			handler(index){
				uni.previewMedia({
					sources:this.value,
					current:index
				})
			}
		}
	}
</script>

<style>
</style>