lunbo.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <div id="lunbo">
  3. <el-row>
  4. <el-col :span="24" class="lunbo">
  5. <el-col :span="24" class="lunboTop">
  6. <span>合作单位</span>
  7. </el-col>
  8. <el-col :span="24">
  9. <el-carousel height="270px" direction="vertical" :autoplay="true">
  10. <el-carousel-item v-for="(item, index) in lunboList" :key="index" @click.native="toOpen(item.url)">
  11. <img :src="item.pic" class="img" />
  12. </el-carousel-item>
  13. </el-carousel>
  14. </el-col>
  15. </el-col>
  16. </el-row>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. name: 'lunbo',
  22. props: {
  23. lunboList: null,
  24. },
  25. components: {},
  26. data: () => ({}),
  27. created() {},
  28. computed: {},
  29. methods: {
  30. toOpen(url) {
  31. if (url.includes('http')) window.open(url);
  32. else window.open(`http://${url}`);
  33. },
  34. },
  35. };
  36. </script>
  37. <style lang="less" scoped>
  38. .lunboTop {
  39. height: 30px;
  40. border-bottom: 1px solid #ccc;
  41. margin: 0 0 10px 0;
  42. }
  43. .lunboTop span {
  44. display: inline-block;
  45. height: 29px;
  46. line-height: 29px;
  47. border-bottom: 1px solid #850000;
  48. padding: 0 5px;
  49. }
  50. .img {
  51. max-width: 100%;
  52. max-height: 100%;
  53. vertical-align: middle;
  54. }
  55. </style>