Currently, I am utilizing the Vue Slider component from this source. My goal is to enhance the functionality of the slider by increasing it to the next index and beyond. The issue lies in the fact that the current implementation increments by 1, as the value is hardcoded within the parameters of the setIndex function. When attempting to pass a variable, an error is triggered. It appears that the setIndex function does not support variable names.
<button @click="setIndex('m-slider', 1)">+</button>
setIndex(name, num) {
let slider = this.$refs[name];
slider.setIndex(num);
}
My query now pertains to how I can modify the button click action to increment or decrement to the subsequent index with each click, while still retaining the hardcoded value.