fixed weight slider
This commit is contained in:
parent
7bbbf54044
commit
75e5b034df
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<v-row no-gutters justify="center" class="weight-tuner">
|
||||
<!-- eslint-disable-next-line -->
|
||||
<v-col v-for="(weight, idx) in weights">
|
||||
<v-col v-for="(_ , idx) in weights" :key="idx">
|
||||
<div class="weight-container">
|
||||
<vue-slider
|
||||
:value="weight"
|
||||
v-model="weights[idx]"
|
||||
@change="updateWeight(idx, $event)"
|
||||
direction="btt"
|
||||
:height="100"
|
||||
@ -26,7 +26,10 @@ import { computed } from "vue";
|
||||
|
||||
const store = usePStore();
|
||||
|
||||
const weights = computed(() => store.weights);
|
||||
const weights = computed({
|
||||
get: () => store.weights,
|
||||
set: (value) => store.setWeights(value),
|
||||
});
|
||||
|
||||
const updateWeight = (index, newValue) => {
|
||||
const newWeights = weights.value.slice();
|
||||
|
Loading…
Reference in New Issue
Block a user