I am trying to implement a slider into my vue-code but it tends to return to its original position when moved, I would be pleased if you could help me to fix it.
What am I doing wrong?
<script lang="ts">
export default {
props: [
'type',
'min',
'max',
'value',
'step'
],
data() {
return {
rangeVal: this.value
}
}
}
</script>
<template>
<div>
<div style="display: flex; justify-content: space-between">
<label class="form-label">Выберите {{type}}</label>
<output id="rangeSumValue" aria-hidden="true"
style="font-weight: bold; font-size: 20px">{{rangeVal}}</output>
</div>
<input type="range" class="form-range" :min=min :max=max :value=value :step=step v-model=rangeVal />
<div style="display: flex; justify-content: space-between">
<span>{{min}}</span>
<span>{{max}}</span>
</div>
</div>
</template>