Blame view

src/views/profile/components/Account.vue 727 Bytes
d7d9c38c2   Adam   auto commit the c...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  <template>
    <el-form>
      <el-form-item label="Name">
        <el-input v-model.trim="user.name" />
      </el-form-item>
      <el-form-item label="Email">
        <el-input v-model.trim="user.email" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="submit">Update</el-button>
      </el-form-item>
    </el-form>
  </template>
  
  <script>
  export default {
    props: {
      user: {
        type: Object,
        default: () => {
          return {
            name: '',
            email: ''
          }
        }
      }
    },
    methods: {
      submit() {
        this.$message({
          message: 'User information has been updated successfully',
          type: 'success',
          duration: 5 * 1000
        })
      }
    }
  }
  </script>