Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

carouselSection.vue 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <!-- eslint-disable max-len -->
  3. <carousel
  4. :per-page="1"
  5. :mouse-drag="false"
  6. :autoplay="true"
  7. :autoplayTimeout="5000"
  8. :loop="true"
  9. :autoplayHoverPause="false"
  10. >
  11. <slide
  12. v-for="(car, i) in carouselList"
  13. :index="i"
  14. :key="i"
  15. :style="{ height:'1000px', width:'100%', backgroundImage: 'url(' + car.image + ')', backgroundSize: 'cover', backgroundPosition: 'center center'}"
  16. calss="myClass"
  17. >
  18. <div class="intro-content display-table">
  19. <div class="table-cell">
  20. <div class="container">
  21. <div class="row">
  22. <div class="col-lg-8">
  23. <div
  24. class="price-a"
  25. style="opacity:0.7; border: white solid 3px; border-radius: 15px; background-color: white;"
  26. >
  27. <h1 class="intro-title mb-4">{{ car.header }}</h1>
  28. <div class="summary-list" v-if="car.isProperty">
  29. <p v-html="car.address" />
  30. </div>
  31. <div class="summary-list" v-else>
  32. <ul class="list">
  33. <li class="d-flex justify-content-between">
  34. <strong>
  35. <i class="fa fa-bed"></i>&nbsp&nbsp&nbspBedrooms:
  36. </strong>
  37. <span>{{ car.bedrooms }}</span>
  38. </li>
  39. <li class="d-flex justify-content-between">
  40. <strong>
  41. <i class="fa fa-users"></i>&nbsp&nbsp&nbspSleeps:
  42. </strong>
  43. <span>{{ car.sleeps }}</span>
  44. </li>
  45. <li class="d-flex justify-content-between">
  46. <strong>
  47. <i class="fa fa-calendar"></i>&nbsp&nbsp&nbspCheck in:
  48. </strong>
  49. <span>{{ car.arrival | toDate }}</span>
  50. </li>
  51. <li class="d-flex justify-content-between">
  52. <strong>
  53. <i class="fa fa-calendar"></i>&nbsp&nbsp&nbspCheck out:
  54. </strong>
  55. <span>{{ car.departure | toDate}}</span>
  56. </li>
  57. </ul>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </slide>
  66. </carousel>
  67. </template>
  68. <script>
  69. import { mapState, mapActions } from 'vuex';
  70. import { Carousel, Slide } from 'vue-carousel';
  71. export default {
  72. components: {
  73. Carousel,
  74. Slide,
  75. },
  76. methods: {
  77. ...mapActions('carousel', ['getCarouselList']),
  78. },
  79. mounted() {
  80. this.getCarouselList();
  81. },
  82. computed: {
  83. ...mapState('carousel', ['carouselList']),
  84. },
  85. };
  86. </script>