From ccc5ef412b6c799852496ae338a5961f16480470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E5=86=A0=E5=AD=A6?= <1109935898@qq.com> Date: Sun, 26 Jan 2025 13:50:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E7=AD=94=E7=9F=A9=E9=98=B5=E9=9D=9E?= =?UTF-8?q?=E5=BF=85=E9=80=89=E9=A2=98=EF=BC=8C=E6=9C=AA=E4=BD=9C=E7=AD=94?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E4=BA=A4=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Answer/components/js/questions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Answer/components/js/questions.js b/src/views/Answer/components/js/questions.js index ac967585..049ad15b 100644 --- a/src/views/Answer/components/js/questions.js +++ b/src/views/Answer/components/js/questions.js @@ -271,7 +271,7 @@ export default defineComponent({ return isError; }); } - } else if (questionType === 10) { + } else if (answer && questionType === 10) { // 矩阵多选题,列分组时,校验选项数量 const cellGroups = (config?.cell_option_groups?.option_group || []).filter((i) => i.groups?.length); if (cellGroups.length) { @@ -338,7 +338,7 @@ export default defineComponent({ isError = true; } console.log('===', minSelect, Object.keys(answer), answer, perLineSelectedCount); - } else if (questionType === 12) { + } else if (answer && questionType === 12) { question.error = ''; } else if (answer && questionType === 14 && Object.keys(answer).length < config.min_select) { // 图片多选题