Improved cup size query.
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user