54 lines
1.3 KiB
Vue
54 lines
1.3 KiB
Vue
<template>
|
|
<buttonQuestion
|
|
class="radioQuestion"
|
|
isOverflowScrollable
|
|
selectingInitiatesLoad
|
|
:questionText="questionText"
|
|
:answers="styles"
|
|
groupName="ChooseVehicleStyle"
|
|
textPosition="text-start"
|
|
v-model="selectedValue"
|
|
isRequired />
|
|
</template>
|
|
|
|
<script>
|
|
import buttonQuestion from "@/digital-components/button-question/button-question";
|
|
import { useMainStore } from '@/store';
|
|
|
|
export default {
|
|
name: "style-question",
|
|
data() {
|
|
return {
|
|
styles: [],
|
|
};
|
|
},
|
|
props: {
|
|
modelValue: String,
|
|
cmsWidgetName: String,
|
|
},
|
|
computed: {
|
|
questionText() {
|
|
return this.getCmsContent(this.cmsWidgetName, "QuestionText");
|
|
},
|
|
selectedValue: {
|
|
get: function () {
|
|
return this.modelValue;
|
|
},
|
|
set: function (newValue) {
|
|
this.$emit("update:modelValue", newValue);
|
|
},
|
|
},
|
|
},
|
|
components: {
|
|
buttonQuestion,
|
|
},
|
|
methods: {
|
|
loadInitialData() {
|
|
return useMainStore().getVehicleStyles();
|
|
},
|
|
initializeComponent(initialData) {
|
|
this.styles = initialData;
|
|
},
|
|
},
|
|
};
|
|
</script>
|