<template>
  <el-input-number v-model="inputVal" controls-position="right" :min="min" :max="max" @change="handleChange" />
</template>
<script>
export default {
  name: 'RcInput',
  components: {},
  model: {
    event: 'change'
  },
  props: {
    value: [Number, String],
    min: Number,
    max: Number
  },
  data() {
    return {
      inputVal: this.value
    }
  },
  computed: {},
  watch: {
    value(val) {
      this.inputVal = val
    }
  },
  created() {},
  mounted() {},
  methods: {
    handleChange(val) {
      this.$emit('change', val)
    }
  }
}
</script>
