<template>
  <VaForm ref="myForm">
    <div class="label">
      <VaInput name="firstName" label="角色名称" v-model="form.roleName" />
    </div>
  </VaForm>
</template>

<script>
  let defaultForm = {
    roleName: '',
  }
  export default {
    name: 'roleForm',
    methods: {
      setData(data) {
        Object.keys(this.form).forEach((x) => {
          this.form[x] = data[x]
        })
      },
    },
    data() {
      return {
        form: {
          ...defaultForm,
        },
      }
    },
  }
</script>

<style scoped>
  .label {
    margin-top: 20px;
  }
</style>
