<template>
  <el-form-item :label="label" :rules="requireRule(required, label)" :prop="prop">
    <el-input-number
      v-model="$parent.model[prop]"
      :placeholder="`请输入${label}`" :clearable="clearable" :disabled="disabled"
      :min="min" :max="max" :precision="precision" :controls="false" />
  </el-form-item>
</template>

<script>
import mixin from './mixin'
/**
 * 数字输入框组件
 */
export default {
  mixins: [mixin],
  props: {
    min: {
      type: Number,
      default: 0
    },
    max: {
      type: Number,
      default: 99999999
    },
    precision: {
      type: Number,
      default: 0
    }
  }
}
</script>
