Improved cup size query.

This commit is contained in:
DebaucheryLibrarian
2021-03-03 13:47:27 +01:00
parent 0124561686
commit 2f401765b6
3 changed files with 21 additions and 4 deletions

View File

@@ -64,6 +64,11 @@ function maxPercentage() {
}
function emit() {
if (this.values) {
this.$emit('change', [this.values[this.minValue], this.values[this.maxValue]]);
return;
}
this.$emit('change', [this.minValue, this.maxValue]);
}
@@ -88,6 +93,10 @@ export default {
type: Array,
default: () => [3, 7],
},
values: {
type: Array,
default: null,
},
disabled: {
type: Boolean,
default: false,
@@ -95,6 +104,13 @@ export default {
},
emits: ['change'],
data() {
if (this.values) {
return {
valueA: this.values.indexOf(this.value[0]),
valueB: this.values.indexOf(this.value[1]),
};
}
return {
valueA: this.value[0],
valueB: this.value[1],