Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

carouselSection.vue 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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.95; border: white solid 3px; border-radius: 15px; background-color: white;"
  26. >
  27. <h1 class="intro-title mb-4">{{ car.header }}</h1>
  28. <div v-if="car.isProperty">
  29. <p class="color-b" v-html="car.address" />
  30. </div>
  31. <div v-else>
  32. <ul class="list color-b">
  33. <li class="d-flex justify-content-between">
  34. <strong>Bedrooms:</strong>
  35. <span>{{ car.bedrooms }}</span>
  36. </li>
  37. <li class="d-flex justify-content-between">
  38. <strong>Sleeps:</strong>
  39. <span>{{ car.sleeps }}</span>
  40. </li>
  41. <li class="d-flex justify-content-between">
  42. <strong>Check in:</strong>
  43. <span>{{ car.arrival | toDate }}</span>
  44. </li>
  45. <li class="d-flex justify-content-between">
  46. <strong>Check out:</strong>
  47. <span>{{ car.departure | toDate}}</span>
  48. </li>
  49. </ul>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </slide>
  58. </carousel>
  59. </template>
  60. <script>
  61. import { mapState, mapActions } from 'vuex';
  62. import { Carousel, Slide } from 'vue-carousel';
  63. export default {
  64. components: {
  65. Carousel,
  66. Slide,
  67. },
  68. methods: {
  69. ...mapActions('carousel', ['getCarouselList']),
  70. },
  71. mounted() {
  72. this.getCarouselList();
  73. },
  74. computed: {
  75. ...mapState('carousel', ['carouselList']),
  76. },
  77. };
  78. </script>