import RuFlag from 'circle-flags/flags/ru.svg'
<RuFlag />
<section class="section section_fifth">
<div class="row row_7">
<div class="col-lg-12 gallery">
<img class="img_gallery" src="img/Rectangle 7.2.png" alt=""><img class="img_gallery" src="img/Rectangle 7.3.png" alt=""><img class="img_gallery" src="img/Rectangle 7.2.png" alt=""><img class="img_gallery" src="img/Rectangle 7.3.png" alt=""><img class="img_gallery" src="img/Rectangle 7.3.png" alt=""><img class="img_gallery" src="img/Rectangle 7.2.png" alt=""><img class="img_gallery" src="img/Rectangle 7.3.png" alt=""><img class="img_gallery" src="img/Rectangle 7.2.png" alt="">
</div>
</div>
</section>
computed: {
range() {
const prices = this.filterData.map(n => n.price);
return {
min: Math.min(...prices),
max: Math.max(...prices),
};
},
// или
range() {
return this.filterData.reduce(({ min, max }, { price: n }) => ({
min: min < n ? min : n,
max: max > n ? max : n,
}), { min: Infinity, max: -Infinity });
},
// или
range() {
const prices = this.filterData.map(n => n.price).sort((a, b) => a - b);
return {
min: prices[0] ?? Infinity,
max: prices[prices.length - 1] ?? -Infinity,
};
},
},
<input type="range" v-bind="range">