<template>
  <div class="questionnaire">
    <h1>问卷调查</h1>
    <el-form @submit.prevent="submitSurvey">
      <el-form-item label="您的年龄">
        <el-input v-model="survey.age" placeholder="请输入您的年龄"></el-input>
      </el-form-item>
      <el-form-item label="您的性别">
        <el-radio-group v-model="survey.gender">
          <el-radio label="男">男</el-radio>
          <el-radio label="女">女</el-radio>
          <el-radio label="其他">其他</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-button type="primary" @click="submitSurvey">提交问卷</el-button>
    </el-form>
  </div>
</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Questionnaire',
  data () {
    return {
      survey: {
        age: '',
        gender: ''
      }
    }
  },
  methods: {
    submitSurvey () {
      console.log('提交的问卷:', this.survey)
      // 处理提交逻辑
    }
  }
}
</script>

<style scoped>
.questionnaire {
  padding: 20px;
}
</style>
