<template>
  <el-form-item :label="label" :rules="requireRule(required, label, validate)" :prop="prop">
    <el-input
      v-model.trim="$parent.model[prop]"
      :placeholder="placeholder || `请输入${label}`" :clearable="clearable" :disabled="disabled" :type="type" :rows="7"
      :maxlength="maxlength" />
  </el-form-item>
</template>

<script>
import mixin from './mixin'
/**
 * 输入框组件
 */
export default {
  mixins: [mixin],
  props: {
    validate: {
      type: String
    },
    type: {
      type: String,
      default: 'input'
    },
    maxlength: {
      type: Number,
      default: 20
    }
  }
}
</script>
