<template>
  <LabelBox
    :label="formItems.attrs?.label"
    :need-star="formItems.attrs?.needStar"
    :width="formItems.attrs?.width"
  >
    <el-input-number
      v-model="value"
      class="numberInput"
      size="mini"
      :placeholder="formItems.attrs?.placeholder || '请填写'"
      label="描述文字"
      v-bind="formItems.attrs"
      @change="handleChangeEvent"
    />
  </LabelBox>
</template>

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

export default {
  components: {
    LabelBox,
  },
  props: {
    formItems: {
      type: Object,
      default: () => {},
    },
    value: {
      type: Number,
      default: 0,
    },
  },
};
</script>
<style lang="scss" scoped>
::v-deep.el-input {
  height: 24px;
  line-height: 24px;
}
::v-deep .el-input-number {
  width: 100%;
}

::v-deep.numberInput .el-input--mini {
  .el-input__inner {
    height: 24px;
  }
}

::v-deep.el-input-number--mini {
  .el-input-number__increase,
  .el-input-number__decrease {
    width: 22px;
    height: 22px;
    line-height: 22px;
    top: 2px;
  }
}

::v-deep.numberInput .el-input--mini {
  .el-input__inner {
    text-align: center;
    height: 24px;
    line-height: 23px;
    // color: #f00;
  }
}
</style>

