<template>
  <div class="select-form">
    <el-form-item
      :key="item.model"
      :prop="item.model"
      :label="item.label || ''"
      :label-width="item.labelWidth || item['label-width'] || ''"
      :required="item.required || false"
      :rules="item.rules || []"
      :size="item.size"
    >
      <el-input :style="{ width: item.modelWidth || item['model-width'] || '100%' }"
        type="textarea"
        :rows="item.rows || 3"
        v-bind="item.attrs || {}"
        v-on="$listeners"
        v-model="formData[item.model]"
        :placeholder="item.placeholder || ''"
        :disabled="item.disabled || false"
      ></el-input>
    </el-form-item>
  </div>
</template>

<script>
export default {
  name: 'TextareaForm',
  componentName: 'TextareaForm',
  props: {
    item: {
      type: Object,
      default () {
        return {}
      }
    },
    formData: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  data () {
    return {}
  }
}
</script>
