.filter(item => {
if (this.room === "1") {
return item;
}
const room = this.room;
if (item.features && item.features.internals && item.features.internals.length > 0) {
return item.features.internals.some(el => {
if (el.name === 'Camere' && el.number !== "") {
return Number(room) === Number(el.number)
}
});
} else {
return true;
}
})
prevPlanimetry(){
this.showPlanimetry = false;
if (this.currentPlanimetry === 0) {
this.currentPlanimetry = this.planimetry.length - 1
setTimeout(() => {
this.showPlanimetry = true;
}, 300);
} else {
this.currentPlanimetry--
setTimeout(() => {
this.showPlanimetry = true;
}, 300);
}
},
nextPlanimetry(){
this.showPlanimetry = false;
if (this.currentPlanimetry === this.planimetry.length - 1) {
this.currentPlanimetry = 0
setTimeout(() => {
this.showPlanimetry = true;
}, 300);
} else {
this.currentPlanimetry++
setTimeout(() => {
this.showPlanimetry = true;
}, 300);
}
},
<div class="single-estate-planimetry__slider">
<div class="single-estate__descr-img">
<transition name="planslider" appear>
<img v-if="planimetry[currentPlanimetry]" :src="planimetry[currentPlanimetry].nome" :alt="planimetry[currentPlanimetry].title">
</transition>
</div>
</div>
.planslider-enter-active, .planslider-leave-active {
transition: opacity 1s;
}
.planslider-enter, .planslider-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}