|
@@ -1,6 +1,6 @@
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
|
|
<template>
|
|
|
- <div class="select-preview">
|
|
|
+ <div class="chinese-preview">
|
|
|
<div class="stem">
|
|
|
<span class="question-number">{{ data.property.question_number }}.</span>
|
|
|
<span v-html="sanitizeHTML(data.stem)"></span>
|
|
@@ -10,78 +10,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { computeOptionMethods, selectTypeList } from '@/views/exercise_questions/data/common';
|
|
|
-
|
|
|
import PreviewMixin from './components/PreviewMixin';
|
|
|
|
|
|
export default {
|
|
|
name: 'ChinesePreview',
|
|
|
mixins: [PreviewMixin],
|
|
|
data() {
|
|
|
- return {
|
|
|
- computeOptionMethods,
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- isAnswer(mark) {
|
|
|
- return this.answer.select_list.indexOf(mark) !== -1;
|
|
|
- },
|
|
|
- selectAnswer(mark) {
|
|
|
- const index = this.answer.select_list.indexOf(mark);
|
|
|
- if (this.data.property.select_type === selectTypeList[0].value) {
|
|
|
- this.answer.select_list = [mark];
|
|
|
- }
|
|
|
- if (this.data.property.select_type === selectTypeList[1].value) {
|
|
|
- if (index === -1) {
|
|
|
- this.answer.select_list.push(mark);
|
|
|
- } else {
|
|
|
- this.answer.select_list.splice(index, 1);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ return {};
|
|
|
},
|
|
|
+ methods: {},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@use '@/styles/mixin.scss' as *;
|
|
|
|
|
|
-.select-preview {
|
|
|
+.chinese-preview {
|
|
|
@include preview;
|
|
|
-
|
|
|
- .option-list {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- row-gap: 16px;
|
|
|
-
|
|
|
- .option-item {
|
|
|
- display: flex;
|
|
|
- column-gap: 8px;
|
|
|
- align-items: center;
|
|
|
- padding: 12px 24px;
|
|
|
- color: #706f78;
|
|
|
- cursor: pointer;
|
|
|
- background-color: #f9f8f9;
|
|
|
- border-radius: 40px;
|
|
|
-
|
|
|
- .selectionbox {
|
|
|
- width: 14px;
|
|
|
- height: 14px;
|
|
|
- margin-right: 8px;
|
|
|
- border: 2px solid #dcdbdd;
|
|
|
- border-radius: 50%;
|
|
|
- }
|
|
|
-
|
|
|
- &.active {
|
|
|
- color: #34343a;
|
|
|
- background-color: #e7eeff;
|
|
|
-
|
|
|
- .selectionbox {
|
|
|
- border-color: #306eff;
|
|
|
- border-width: 4px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|