|
@@ -201,6 +201,19 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ 'data.option_list': {
|
|
|
+ handler(val) {
|
|
|
+ if (!val) return;
|
|
|
+ // 删除答案中不存在的选项
|
|
|
+ this.data.answer.answer_list.forEach((item, i) => {
|
|
|
+ if (!val.find((li) => li.mark === item.mark)) {
|
|
|
+ this.data.answer.answer_list.splice(i, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
addOption() {
|
|
|
this.data.option_list.push(getOption());
|