default model value
This commit is contained in:
parent
b10d8c55ce
commit
46791251b2
1 changed files with 7 additions and 5 deletions
|
|
@ -6,10 +6,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container nested-radio" v-for="(value, name, index) in featureListData" :key="index">
|
<div class="container nested-radio" v-for="(value, name, index) in featureListData" :key="index">
|
||||||
{{ selectedTint }}
|
|
||||||
<div class="row my-2">
|
<div class="row my-2">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<listCard v-model="selectedTint[name]" :isRadio="true" :isWide="true" :buttonImage="
|
<listCard v-model="selectedTint[name]" :selectedValues="selectedTint[name]" :value="selectedTint[name]" :isRadio="true" :isWide="true" :buttonImage="
|
||||||
require(`@/assets/img/tints/${getTintSourceImage(
|
require(`@/assets/img/tints/${getTintSourceImage(
|
||||||
glassLocation,
|
glassLocation,
|
||||||
name
|
name
|
||||||
|
|
@ -58,7 +57,10 @@ export default {
|
||||||
glassName: String,
|
glassName: String,
|
||||||
glassLocation: String,
|
glassLocation: String,
|
||||||
colorAnswers: Array,
|
colorAnswers: Array,
|
||||||
modelValue: Object,
|
modelValue: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.LoadPreselectedValues();
|
this.LoadPreselectedValues();
|
||||||
|
|
@ -168,7 +170,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
LoadPreselectedValues() {
|
LoadPreselectedValues() {
|
||||||
if (this.modelValue !== undefined) {
|
if (Object.keys(this.modelValue).length !== 0) {
|
||||||
// Populate button-question model-value if parts data already exists in VueX
|
// Populate button-question model-value if parts data already exists in VueX
|
||||||
const alreadyPopulatedPartsData =
|
const alreadyPopulatedPartsData =
|
||||||
this.$store.getters.lineItems.glassParts;
|
this.$store.getters.lineItems.glassParts;
|
||||||
|
|
@ -188,7 +190,7 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue