🎨 每日一题展示效果优化

This commit is contained in:
ronger 2022-01-03 12:53:30 +08:00
parent b45ea4e8db
commit 64522861ed

View File

@ -10,17 +10,19 @@
</el-col> </el-col>
</el-col> </el-col>
<el-col class="question-content"> <el-col class="question-content">
<span v-html="getQuestionContent(answerRecord.questionContent)"></span> <h2 v-html="getQuestionContent(answerRecord.questionContent)"></h2>
</el-col> </el-col>
<el-col> <el-col>
<el-col v-if="answerRecord.subjectAnswerRecords"> <el-col v-if="answerRecord.subjectAnswerRecords">
<el-col class="question-option"> <el-col class="question-option">
<el-radio-group v-model="answerRecord.subjectAnswerRecords[0].answer" :disabled="true"> <el-radio-group v-model="answerRecord.subjectAnswerRecords[0].answer" :disabled="true">
<template v-for="subjectOption in answerRecord.subjectOptionDTOList"> <template v-for="subjectOption in answerRecord.subjectOptionDTOList">
<el-radio :key="subjectOption.optionName" :label="subjectOption.optionName"> <el-col :span="24" style="margin-bottom: 10px;">
<span>{{ subjectOption.optionName }}.</span> <el-radio :key="subjectOption.optionName" :label="subjectOption.optionName">
<span>{{ subjectOption.optionContent }}</span> <span>{{ subjectOption.optionName }}.</span>
</el-radio> <span>{{ subjectOption.optionContent }}</span>
</el-radio>
</el-col>
</template> </template>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
@ -37,10 +39,12 @@
<el-col class="question-option"> <el-col class="question-option">
<el-radio-group v-model="answer"> <el-radio-group v-model="answer">
<template v-for="subjectOption in answerRecord.subjectOptionDTOList"> <template v-for="subjectOption in answerRecord.subjectOptionDTOList">
<el-radio :key="subjectOption.optionName" :label="subjectOption.optionName"> <el-col :span="24" style="margin-bottom: 10px;">
<span>{{ subjectOption.optionName }}.</span> <el-radio :key="subjectOption.optionName" :label="subjectOption.optionName">
<span>{{ subjectOption.optionContent }}</span> <span>{{ subjectOption.optionName }}.</span>
</el-radio> <span>{{ subjectOption.optionContent }}</span>
</el-radio>
</el-col>
</template> </template>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
@ -78,7 +82,7 @@ export default {
}, },
methods: { methods: {
getQuestionContent(questionContent) { getQuestionContent(questionContent) {
questionContent = questionContent.replace("", ""); questionContent = questionContent.replace("", "____");
questionContent = questionContent.replace("", ""); questionContent = questionContent.replace("", "");
return questionContent; return questionContent;
}, },