fixed slider bug
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
<template v-for="(btn, i) in btns.arrows" :key="i">
|
||||
<Button v-if="device == 'desktop'" v-bind="btn" />
|
||||
</template>
|
||||
<Swiper v-bind="swipers.topSlider">
|
||||
<Swiper
|
||||
:loop="true"
|
||||
v-bind="swipers.topSlider">
|
||||
<SwiperSlide v-for="{ link, images, title, id } in sliders" :key="id">
|
||||
<router-link :to="link">
|
||||
<img :title="title" :src="images[device] + '?w=1980'" />
|
||||
<img :title="title" :src="images[device]" />
|
||||
</router-link>
|
||||
</SwiperSlide>
|
||||
</Swiper>
|
||||
@@ -17,6 +19,8 @@
|
||||
const { swipers, btns } = inject('init')
|
||||
const { device } = inject('service')
|
||||
const { sliders } = inject('data')
|
||||
console.log(sliders, 'sliders');
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -24,7 +28,7 @@ const { sliders } = inject('data')
|
||||
@apply w-full h-max flex z-0;
|
||||
|
||||
.swiper {
|
||||
@apply w-full h-max;
|
||||
@apply w-full h-auto lg:h-[550px];
|
||||
|
||||
.swiper-wrapper {
|
||||
@apply z-0 h-max bg-gray-50;
|
||||
@@ -34,7 +38,7 @@ const { sliders } = inject('data')
|
||||
|
||||
a {
|
||||
img {
|
||||
@apply w-full object-cover h-full;
|
||||
@apply w-full object-cover h-auto lg:h-[550px];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user