<template>
  <VaForm ref="myForm">
    <div class="label">
      <VaInput name="firstName" label="组织名称" v-model="form.orgName" />
    </div>
    <div class="label">
      <VaInput name="firstName" label="部门负责人" v-model="form.orgLeader" />
    </div>
    <div class="label">
      <VaInput name="firstName" label="部门负责人联系方式" v-model="form.orgLeaderPhone" />
    </div>
    <div class="label">
      <VaInput name="firstName" label="部门描述" v-model="form.description" />
    </div>
  </VaForm>
</template>

<script>
  let defaultForm = {
    orgName: '',
    orgLeader: '',
    orgLeaderPhone: '',
    description: '',
  }
  export default {
    name: 'orgForm',
    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>
