<template>
  <div class="testForm">
    答题
    <div v-for="(item,index) in questionList" :key="index">
      <div v-if="activeIndex === index">
        <div>{{ item.subject }}</div>
        <div @click="next">下一题</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: 0,
      questionList: [
        {
          index: 0,
          subject: "第1题",
          answer: "答案",
          jiexi: '解析'
        },
        {
          index: 1,
          subject: "第2题",
          answer: "答案",
          jiexi: '解析'
        },
        {
          index: 2,
          subject: "第3题",
          answer: "答案",
          jiexi: '解析'
        },
        {
          index: 3,
          subject: "第4题",
          answer: "答案",
          jiexi: '解析'
        },
        {
          index: 4,
          subject: "第5题",
          answer: "答案",
          jiexi: '解析'
        }
      ]
    }
  },
  methods: {
    getList() {
      console.log('题目列表');
    },
    next() {
      this.activeIndex ++;
    }
  },
  onReachBottom() {
    this.current ++;
  },
}
</script>

<style lang="scss" scoped>
.testForm {

}
</style>