photoNews.vue 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <div id="phontoNews">
  3. <el-col :span="24" class="info">
  4. <div class="block">
  5. <el-carousel height="360px">
  6. <el-carousel-item v-for="(item, index) in photoNews" :key="index">
  7. <el-image style="width:100%;height:360px;" :src="item.picture"></el-image>
  8. <p class="title textOver">{{ item.title }}</p>
  9. </el-carousel-item>
  10. </el-carousel>
  11. </div>
  12. </el-col>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. name: 'phontoNews',
  18. props: {
  19. photoNews: null,
  20. },
  21. components: {},
  22. data: () => ({}),
  23. created() {},
  24. computed: {},
  25. methods: {},
  26. };
  27. </script>
  28. <style lang="less" scoped>
  29. p {
  30. padding: 0;
  31. margin: 0;
  32. }
  33. .info {
  34. padding: 20px;
  35. }
  36. /deep/.el-carousel__indicators {
  37. display: none;
  38. }
  39. .title {
  40. position: absolute;
  41. bottom: 0;
  42. width: 97%;
  43. height: 30px;
  44. line-height: 30px;
  45. padding: 0 10px;
  46. color: #fff;
  47. background: #22529a;
  48. }
  49. </style>