From c7cb365e39f020daf713026d0d0935576248456d Mon Sep 17 00:00:00 2001 From: yanzai Date: Wed, 20 Nov 2024 09:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=AF=84=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5/pages/main/questionnaire/index.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/h5/pages/main/questionnaire/index.vue b/h5/pages/main/questionnaire/index.vue index 9b60c73..2229aa8 100644 --- a/h5/pages/main/questionnaire/index.vue +++ b/h5/pages/main/questionnaire/index.vue @@ -75,9 +75,9 @@ const getContent = (item) => { return contentArr; }; -const checkItem = (val, index) => { +const checkItem = (val, index,topicIndex) => { console.log(val); - let items = topicList.value[topicIndex.value]; + let items = topicList.value[topicIndex]; console.log(items); if (items.type == 2) { // 单选 @@ -93,10 +93,10 @@ const checkItem = (val, index) => { } else { // 多选 if (items.answer.includes(val.value)) { - items.answer = topicList.value[topicIndex.value].answer.filter( + items.answer = topicList.value[topicIndex].answer.filter( (item) => item != val.value ); - items.index = topicList.value[topicIndex.value].index.filter( + items.index = topicList.value[topicIndex].index.filter( (item) => item != index ); items.more[index] = ""; // 清空对应的多余的说明 @@ -107,6 +107,7 @@ const checkItem = (val, index) => { items.isInputList[index] = val.isInput; } } + console.log(topicList.value); }; @@ -298,7 +299,7 @@ onShow(() => { {