<template>
  <div class="psychological-test">
    <h1>心理测试</h1>
    <el-form @submit.prevent="submitTest">
      <el-form-item label="问题 1">
        <el-radio-group v-model="answers.q1">
          <el-radio label="A">选项 A</el-radio>
          <el-radio label="B">选项 B</el-radio>
          <el-radio label="C">选项 C</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="问题 2">
        <el-radio-group v-model="answers.q2">
          <el-radio label="A">选项 A</el-radio>
          <el-radio label="B">选项 B</el-radio>
          <el-radio label="C">选项 C</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-button type="primary" @click="submitTest">提交测试</el-button>
    </el-form>
  </div>
</template>

<script>
export default {
  data () {
    return {
      answers: {
        q1: '',
        q2: ''
      }
    }
  },
  methods: {
    submitTest () {
      console.log('提交的答案:', this.answers)
      // 处理提交逻辑
    }
  }
}
</script>

<style scoped>
.psychological-test {
  padding: 20px;
}
</style>
