<!--连线题-->
<style>
  .v_matchingQuestion {
    width: 100%;
  }

  .team_tit {
    display: inline-block;
    font-size: 14px;
    color: #A8A8B3;
    padding-bottom: 20px;
    margin-left: 13px;
  }

  .line_center {
    display: inline-block;
    width: 28px;
    height: 10px;
    border-top: 1px solid #E1E1E5;
    margin: 13px 12px 0 0;
  }

</style>
<template>
  <div class="v_matchingQuestion">
    <table v-if="data&&data.QuestionContentObj&&data.QuestionContentObj.length>0" class="common_TiTable">
      <thead>
        <tr>
          <th colspan="2">第一组</th>
          <th colspan="2">第二组</th>
        </tr>
      </thead>
      <tr v-for="(item,index) in data.QuestionContentObj[0]">
        <td style="width:40px;text-align:center;padding-top:10px;">
          {{item.Name}}
        </td>
        <td>
          <div class="InpDIV" style="width:100%;border:0;" v-html="item.Content"></div>
        </td>
        <td style="width:40px;text-align:center;padding-top:10px;">
          {{data.QuestionContentObj[1][index].Name}}
        </td>
        <td>
          <div class="InpDIV" style="width:100%;border:0;" v-html="data.QuestionContentObj[1][index].Content"></div>
        </td>
      </tr>
    </table>
    <span class="team_tit" v-if="isShowAnswer">答案</span>
    <table v-if="isShowAnswer&&data&&data.QuestionContentObj&&data.QuestionContentObj.length>2"
      style="padding-left:13px;">
      <tr v-for="(item,index) in data.QuestionContentObj[0]">
        <td style="width:30px;">
          {{item.Name}}
        </td>
        <td>
          <span class="line_center"></span>
        </td>
        <td>
          {{data.QuestionContentObj[2][index].Content}}
        </td>
      </tr>
      <tfoot>
        <tr>
          <td colspan="3">
            解析：<span v-html="data.AnswerParse"></span>
          </td>
        </tr>
      </tfoot>
    </table>
  </div>
</template>
<script>
  export default {
    props: {
      questionObj: {
        type: Object,
      },
      //是否显示答案和解析
      isShowAnswer: {
        type: Boolean,
        default: false,
      }
    },
    data() {
      return {
        data: this.questionObj,
      };
    },
    methods: {

    },
    mounted() {},
    watch: {
      isShowAnswer: {
        handler(newValue) {

        },
        deep: true
      },
    }
  };

</script>
