if(this.$route.query[itemNameParent]){
const news = `${this.$route.query[itemNameParent]} ${e.target.value}`
this.$router.push({
query: {
...this.$route.query,
[itemNameParent]: [news],
},
})
alert(news)
} else {
this.$router.push({
query: {
...this.$route.query,
[itemNameParent]: [e.target.value],
},
})
}
<MultiRangeSlider baseClassName="multi-range-slider" :min="0" :max="100" :step="1" :ruler="false" :label="false" :minValue="10" :maxValue="70" @input="UpdateValues($event, item.id)" />
async UpdateValues(e, id) {
if (id == 0) {
console.log('change', e.maxValue)
console.log('ide', id)
this.form.cost_from = e.minValue
this.form.cost_til = e.maxValue
} else {
const index = this.form.params.findIndex(element => element.id == id);
if (index == -1) {
this.form.params.push({
id,
value: [e.minValue, e.maxValue],
is_range: true
})
} else {
this.form.params[index]['value'] = [e.minValue, e.maxValue]
}
}
await this.$store.dispatch('categories/actionGetGoodsCat', this.form);
},