<template>
  <div id="lunbo">
    <el-row>
      <el-col :span="24" class="lunbo">
        <el-col :span="24" class="lunboTop">
          <span>合作单位</span>
        </el-col>
        <el-col :span="24">
          <el-carousel height="270px" direction="vertical" :autoplay="true">
            <el-carousel-item v-for="(item, index) in lunboList" :key="index" @click.native="toOpen(item.url)">
              <img :src="item.pic" class="img" />
            </el-carousel-item>
          </el-carousel>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'lunbo',
  props: {
    lunboList: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    toOpen(url) {
      if (url.includes('http')) window.open(url);
      else window.open(`http://${url}`);
    },
  },
};
</script>

<style lang="less" scoped>
.lunboTop {
  height: 30px;
  border-bottom: 1px solid #ccc;
  margin: 0 0 10px 0;
}
.lunboTop span {
  display: inline-block;
  height: 29px;
  line-height: 29px;
  border-bottom: 1px solid #850000;
  padding: 0 5px;
}
.img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}
</style>
