12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <template>
- <swiper class="swiper simple-swiper" :options="swiperOption">
- <swiper-slide v-for="(item, index) in imageList" :key="index">
- <img :src="item" class="slide" />
- </swiper-slide>
- <div class="swiper-pagination" slot="pagination"></div>
- </swiper>
- </template>
- <script>
- import { Swiper, SwiperSlide } from 'vue-awesome-swiper'
- export default {
- name: 'simple-swiper',
- components: {
- Swiper,
- SwiperSlide,
- },
- props: {
- imageList: {
- type: Array,
- default: () => [],
- },
- },
- data() {
- return {
- swiperOption: {
- pagination: {
- el: '.swiper-pagination',
- clickable: true,
- },
- autoplay: true,
- },
- }
- },
- }
- </script>
- <style scoped lang="scss">
- .simple-swiper {
- height: 100%;
- ::v-deep {
- .swiper-pagination-bullet-active {
- background: #535353 !important;
- }
- }
- }
- </style>
|