瀏覽代碼

去掉多余内容

natasha 1 年之前
父節點
當前提交
7656b05708

+ 4 - 60
src/views/exercise_questions/preview/ChinesePreview.vue

@@ -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>

+ 4 - 60
src/views/exercise_questions/preview/RepeatPreview.vue

@@ -1,6 +1,6 @@
 <!-- eslint-disable vue/no-v-html -->
 <template>
-  <div class="select-preview">
+  <div class="repeat-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: 'RepeatPreview',
   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 {
+.repeat-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>

+ 5 - 59
src/views/exercise_questions/preview/WritePreview.vue

@@ -1,6 +1,6 @@
 <!-- eslint-disable vue/no-v-html -->
 <template>
-  <div class="select-preview">
+  <div class="write-preview">
     <div class="stem">
       <span class="question-number">{{ data.property.question_number }}.</span>
       <span v-html="sanitizeHTML(data.stem)"></span>
@@ -10,78 +10,24 @@
 </template>
 
 <script>
-import { computeOptionMethods, selectTypeList } from '@/views/exercise_questions/data/common';
-
 import PreviewMixin from './components/PreviewMixin';
 
 export default {
   name: 'WritePreview',
   mixins: [PreviewMixin],
   data() {
-    return {
-      computeOptionMethods,
-    };
+    return {};
   },
-  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);
-        }
-      }
-    },
+  created() {
   },
+  methods: {},
 };
 </script>
 
 <style lang="scss" scoped>
 @use '@/styles/mixin.scss' as *;
 
-.select-preview {
+.write-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>