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