From 4e13d9f547ee798e1a78eacbd468ce524c5b4416 Mon Sep 17 00:00:00 2001 From: Denzel Date: Mon, 17 Feb 2025 16:46:38 +0300 Subject: [PATCH] =?UTF-8?q?refactor=20[P-36=20=D0=A3=D0=9C=D0=A2]:=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D0=BA=D1=80=D0=B5=D1=82=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=82?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/testing/DetailCardTest.vue | 22 +------------------ .../src/components/testing/QuestionBlock.vue | 15 +++++++++++-- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/front/src/components/testing/DetailCardTest.vue b/src/front/src/components/testing/DetailCardTest.vue index ab415d289..b309cf4d6 100644 --- a/src/front/src/components/testing/DetailCardTest.vue +++ b/src/front/src/components/testing/DetailCardTest.vue @@ -21,6 +21,7 @@ :currentQuestion="currentQuestion" :totalQuestions="data.question_count" :answers="answers" + :finishTest="openFinishDialog" @change-question="changeQuestion" /> @@ -73,26 +74,6 @@ export default { console.log(data.value); }; - const questions = ref([ - { - question: 'Ваши родители знают что Вы гей?', - options: ['Да', 'Нет'], - correct: 'Да', - }, - { - question: 'Какой цвет у неба?', - options: ['Синий', 'Зеленый', 'Красный', 'Желтый'], - correct: 'Синий', - }, - { question: 'Сколько дней в неделе?', options: ['5', '6', '7', '8'], correct: '7' }, - { - question: 'Как называется столица Франции?', - options: ['Берлин', 'Париж', 'Лондон', 'Рим'], - correct: 'Париж', - }, - { question: 'Сколько ног у паука?', options: ['4', '6', '8', '10'], correct: '8' }, - ]); - const formattedTime = computed(() => { if (!data.value?.time) return '00:00'; @@ -175,7 +156,6 @@ export default { formattedTime, startTest, finishTest, - questions, answers, currentQuestion, changeQuestion, diff --git a/src/front/src/components/testing/QuestionBlock.vue b/src/front/src/components/testing/QuestionBlock.vue index 77c1f3888..b24b054f2 100644 --- a/src/front/src/components/testing/QuestionBlock.vue +++ b/src/front/src/components/testing/QuestionBlock.vue @@ -1,5 +1,5 @@ @@ -38,6 +48,7 @@ export default { question: Object, currentQuestion: Number, totalQuestions: Number, + finishTest: Function, answers: Array, }, emits: ['change-question'],