<template>
  <a-input-number
    class="inputNumber"
    v-bind="$attrs.item"
    v-model="modelList[name]"
    @change="onChange"
    @pressEnter="onPressEnter"
  />
</template>

<script>
import formMixin from "@/minxin/form.mixin.js";
import { InputNumber } from "ant-design-vue";
export default {
  mixins: [formMixin],
  components: { [InputNumber.name]: InputNumber },
  props: {
    name: {},
    modelList: {},
    funcList: {},
  },
  data () {
    return {};
  },
  methods: {
    onChange (e) {
      this.findEvent(this.funcList, this.name, "change", e);
    },
    onPressEnter (e) {
      this.findEvent(this.funcList, this.name, "change", e);
    },
  },
};
</script>

<style lang="less" scoped>
.inputNumber {
  width: 100%;
}
</style>
