11 - Forms/xno-forms-01-starting-setup/src/components/RatingControl.vue
@@ -13,14 +13,22 @@ </template> <script>export default { data() { return { activeOption: null, }; props: ['modelValue'], emits: ['update:modelValue'], // data() { // return { // activeOption: null, // }; // }, computed: { activeOption(){ return this.modelValue; } }, methods: { activate(option) { this.activeOption = option; // this.activeOption = option; this.$emit('update:modelValue', option); } }