Ver Fonte

强制https

y595705120 há 2 anos atrás
pai
commit
4f3560c987
2 ficheiros alterados com 44 adições e 0 exclusões
  1. 1 0
      index.html
  2. 43 0
      src/containers/center/exam/components/question.vue

+ 1 - 0
index.html

@@ -3,6 +3,7 @@
   <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv=Content-Security-Policy content=upgrade-insecure-requests>
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <meta http-equiv="X-UA-Compatible" content="IE=9;IE=EDGE">
     <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

+ 43 - 0
src/containers/center/exam/components/question.vue

@@ -0,0 +1,43 @@
+<template>
+  <div>
+    <div class="answer" v-if="currentQuestion.type==1">
+      <div class="answer-item" v-for="(item,index) in currentQuestion.choice" :key="index">
+        <el-radio v-model="radio" :label="index+1">
+          <span class="answer-title">{{transformChar[index]+'、 '+item}}</span>
+        </el-radio>
+      </div>
+    </div>
+    
+    <!-- 当选题 -->
+    <div class="answer" v-if="currentQuestion.type==2">
+      <div class="answer-item" v-for="(item,index) in currentQuestion.choice" :key="index">
+        <el-radio v-model="radio" :label="index+1">
+          <span class="answer-title">{{transformChar[index]+'、 '+item}}</span>
+        </el-radio>
+      </div>
+    </div>
+    
+    <!-- 多选题 -->
+    <div class="answer" v-if="currentQuestion.type==3">
+      <div class="answer-item" v-for="(item,index) in currentQuestion.choice" :key="index">
+         <el-checkbox  v-model="checked[index]" :label="index+1">
+            <span class="answer-title">{{transformChar[index]+'、 '+item}}</span>
+         </el-checkbox>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: ['currentQuestion'],
+    data:{
+      return {
+        transformChar: ["A", "B", "C", "D","E"],
+      }
+    }
+  }
+</script>
+
+<style>
+</style>