
<template>
  <div>
    <h1>个人设置</h1>
    <form @submit.prevent="updateProfile">
      <div>
        <label>用户名:</label>
        <input type="text" v-model="userProfile.username" required />
      </div>
      <div>
        <label>邮箱:</label>
        <input type="email" v-model="userProfile.email" required />
      </div>
      <button type="submit">更新</button>
    </form>
  </div>
</template>

<script>export default {
  data() {
    return {
      userProfile: {
        username: '用户1',
        email: 'user@example.com'
      }
    };
  },
  methods: {
    updateProfile() {
      // 更新个人资料的逻辑
      console.log('更新后的信息:', this.userProfile);
    }
  }
};
</script>
