39 lines
964 B
JavaScript
39 lines
964 B
JavaScript
export default {
|
|
props: {
|
|
modelValue: [Array, String, Number],
|
|
value: [String, Number],
|
|
isMultiSelect: Boolean,
|
|
groupName: String,
|
|
buttonLabel: [Number, String],
|
|
buttonLabelSubCopy: String,
|
|
buttonImage: String,
|
|
altText: String,
|
|
textPosition: String,
|
|
screenReaderOnlyText: String,
|
|
valueToLogType: String,
|
|
validationRules: String,
|
|
isWide: Boolean
|
|
},
|
|
data() {
|
|
return {
|
|
selectedValue: null,
|
|
};
|
|
},
|
|
mounted() {
|
|
this.selectedValue = this.modelValue;
|
|
},
|
|
methods: {
|
|
handleAnswerChange(e) {
|
|
if (this.preHandleAnswerChange) {
|
|
this.preHandleAnswerChange(e)
|
|
}
|
|
|
|
this.$emit("change", e);
|
|
},
|
|
},
|
|
watch: {
|
|
selectedValue(selectedValue) {
|
|
this.$emit("update:modelValue", selectedValue);
|
|
},
|
|
},
|
|
};
|