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(() => { {