<template>
  <div class="custom-items">
    <el-form ref="form" :model="formData" :rules="rules" label-width="85px">
      <el-form-item label="认证设备" prop="name">
        <el-input v-model="formData.name" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'CustomItems',

  data() {
    return {
      formData: {
        name: ''
      },
      rules: {
        name: [{ required: true, message: '认证设备不能为空', tiggers: ['blur'] }]
      }
    }
  },
  watch: {
    formData: {
      handler: function() {
        this.$emit('change', this.formData)
      },
      deep: true
    }
  },
  methods: {
    validate(callback) {
      return this.$refs.form.validate(callback)
    }
  }
}
</script>
