<template>
	<div>
		<div class="swiper-container">
			<div class="swiper-wrapper">
				<div class="swiper-slide" v-for="(item,index) in list" :key="index">
					<a href>
						<img style="width:100%" :src="item.cover" :alt="item.alt" />
					</a>
				</div>
			</div>
			<!-- Add Pagination -->
			<div class="swiper-pagination"></div>
		</div>
	</div>
</template>

<script>
import axios from '../plugins/axios'
import Swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
export default {
	name: 'banner',
	data() {
		return {
			banner: [
				
			]
		}
	},
	props: [
		'list',
		'looptime',
		'height',
		'width',
		'background',
		'color',
		'fontSize'
	],
	methods: {},
	mounted() {
		let t = this
		let title = this.list
		t.swiper = new Swiper('.swiper-container', {
			autoplay: {
				delay: 10000,//1秒切换一次
			},
			effect: 'fade',
			pagination: {
				el: '.swiper-pagination',
				clickable: true,
				renderBullet: function(index, className) {
					return '<span class="' + className + '">' + title[index].title + '</span>'
				}
			}
		})
	},
	created() {
	}
}
</script>
<style>
@import '../assets/banner.css';
.swiper-pagination-bullet{
	display: inline-block;
    width: auto;
    height: auto;
    background: #fff;
    opacity: 1;
    padding: 8px 19px;
    border-radius: 0;
	font-size: 14px;
	margin: 10px 4px !important;
}
.swiper-pagination-bullet-active{
	background: #1bbb9f;
	color: #fff;
}
</style>
