<template>
  <LabelBox
    :label="formItems.attrs?.label"
    :need-star="formItems.attrs?.needStar"
    :width="formItems.attrs?.width"
  >
    <el-input
      type="textarea"
      size="mini"
      :placeholder="formItems.attrs?.placeholder || '请填写'"
      :value="value"
      v-bind="formItems.attrs"
      :autosize="{
        minRows: formItems.attrs.minRows,
        maxRows: formItems.attrs.maxRows,
      }"
      @input="handleInputEvent"
      @blur="handleBlurEvent"
      @change="handleChangeEvent"
      @focus="handleFocusEvent"
      @clear="handleClearEvent"
    />
  </LabelBox>
</template>

<script>
import LabelBox from '../labelBox/index.vue';

export default {
  components: {
    LabelBox,
  },
  props: {
    formItems: {
      type: Object,
      default: () => {},
    },
    value: {
      type: String,
      default: '',
    },
  },
};
</script>
<style lang="scss" scoped>
::v-deep.el-textarea .el-textarea__inner {
  padding: 0 7px;
  line-height: 30px;
}
</style>

