|
@@ -98,11 +98,12 @@ export default {
|
|
|
computedIsShowRightAnswer(mark, option_type) {
|
|
|
if (!this.isShowRightAnswer) return '';
|
|
|
let selectOption = this.answer.answer_list.find((item) => item.mark === mark); // 查找是否已选中的选项
|
|
|
- if (!selectOption) return '';
|
|
|
- return this.data.answer.answer_list.find((item) => item.mark === mark).option_type === option_type &&
|
|
|
- !(selectOption.option_type === option_type)
|
|
|
- ? 'answer-right'
|
|
|
- : '';
|
|
|
+ // 是否是正确的选项类型
|
|
|
+ let isCorrectType = this.data.answer.answer_list.find((item) => item.mark === mark).option_type === option_type;
|
|
|
+ if (!selectOption) {
|
|
|
+ return isCorrectType ? 'answer-right' : '';
|
|
|
+ }
|
|
|
+ return isCorrectType && !(selectOption.option_type === option_type) ? 'answer-right' : '';
|
|
|
},
|
|
|
/**
|
|
|
* 计算判断题题干的样式
|