Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

QuestionResponse.vue 834B

12345678910111213141516171819202122232425262728293031323334
  1. <template lang="pug">
  2. .question.pa12
  3. header.w-flex.row.justify-space-between.pb6
  4. label {{question.question}}
  5. section.radio-buttons.w-flex.row.justify-space-between
  6. h3(v-for="label in question.labels") {{label}}
  7. w-radios.w-flex.row.justify-space-between(@update:model-value="onUpdate" :items="radioItems")
  8. </template>
  9. <script>
  10. export default {
  11. props: {
  12. question: {
  13. type: Object,
  14. required: true,
  15. },
  16. },
  17. emits: ['updated'],
  18. data: () => ({
  19. radioItems: [
  20. { answer: 1 },
  21. { answer: 2 },
  22. { answer: 3 },
  23. { answer: 4 },
  24. { answer: 5 },
  25. ],
  26. }),
  27. methods: {
  28. onUpdate(e) {
  29. this.$emit('updated', { ...this.question, answer: e + 1 })
  30. },
  31. },
  32. }
  33. </script>