<template>
  <div>
    <el-carousel trigger="click" style="height:100%">
      <el-carousel-item v-for="item in bannerList" :key="item">
        <el-image
          style="width: 100%;height: 100%"
          :src="item"
          fit="contain"></el-image>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
import { getPortalList} from "@/api";

export default {
  name: 'Carousel',
  data() {
    return {
      bannerList:[],
    }
  },
  mounted() {
    this.getData()
  },
  methods:{
    getData(){
      getPortalList({
        portalConfigType:1,
        pageNum:1,
        pageSize:100
      }).then(e=>{
        this.bannerList = e.rows.map(v=>v.portalConfigPic)
      })
    }
  },
}
</script>

<style lang="less" scoped>

/deep/ .el-carousel__container {
  height: 100%;
}

/deep/ .el-carousel__button {
  width: 50px;
  height: 6px;
  border-radius: 3px;
  background-color: #cfd6de;
}

/deep/ .el-carousel__indicator--horizontal {
  padding: 12px 8px;
}

/deep/ .el-carousel__indicator.is-active button {
  opacity: 1;
  background-color: #3372ff;
}

/deep/ .el-carousel__indicators--horizontal {
  bottom: 5%;
}
</style>
