|
@@ -26,9 +26,10 @@
|
|
|
class="problem-ops"
|
|
|
>
|
|
|
<van-radio-group
|
|
|
+ @change="changeRadioGroup"
|
|
|
:value="problemList[problemListIndex].userAnswer"
|
|
|
>
|
|
|
- <van-radio
|
|
|
+ <van-radio
|
|
|
@change="changeCheckbox"
|
|
|
:value="
|
|
|
problemList[problemListIndex].userAnswer.includes(
|
|
@@ -80,7 +81,6 @@
|
|
|
<van-checkbox-group
|
|
|
:value="problemList[problemListIndex].userAnswer"
|
|
|
:max="4"
|
|
|
- @change="changeGroup"
|
|
|
>
|
|
|
<van-checkbox
|
|
|
@change="changeCheckbox"
|
|
@@ -359,8 +359,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeRadioGroup(e) {
|
|
|
- // console.log(e);
|
|
|
- // this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
|
|
|
+ // console.log(e);
|
|
|
+ this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
|
|
|
+ this.$set(
|
|
|
+ this.problemList[this.problemListIndex],
|
|
|
+ "userAnswer",
|
|
|
+ e.detail
|
|
|
+ );
|
|
|
},
|
|
|
changeCheckbox(e) {
|
|
|
console.log(e);
|
|
@@ -381,7 +386,7 @@ export default {
|
|
|
res.rows.forEach((element) => {
|
|
|
element.optsArr = element.opts.split("-");
|
|
|
element.isCompleted = false;
|
|
|
- element.userAnswer = [];
|
|
|
+ element.userAnswer = "";
|
|
|
});
|
|
|
that.problemListTotal = res.total;
|
|
|
that.problemList = res.rows;
|