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 class="container nested-radio" v-for="(value, name, index) in featureListData" :key="index">
|
||||
{{ selectedTint }}
|
||||
<div class="row my-2">
|
||||
<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(
|
||||
glassLocation,
|
||||
name
|
||||
|
|
@ -58,7 +57,10 @@ export default {
|
|||
glassName: String,
|
||||
glassLocation: String,
|
||||
colorAnswers: Array,
|
||||
modelValue: Object,
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.LoadPreselectedValues();
|
||||
|
|
@ -168,7 +170,7 @@ export default {
|
|||
},
|
||||
|
||||
LoadPreselectedValues() {
|
||||
if (this.modelValue !== undefined) {
|
||||
if (Object.keys(this.modelValue).length !== 0) {
|
||||
// Populate button-question model-value if parts data already exists in VueX
|
||||
const alreadyPopulatedPartsData =
|
||||
this.$store.getters.lineItems.glassParts;
|
||||
|
|
@ -188,7 +190,7 @@ export default {
|
|||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue