<template>
  <a-input-number v-model:value="innerValue" :disabled="see || disabled || readonly" :min="min" :max="max"
    :placeholder="placeholder" :style="style" v-bind="$attrs" />
</template>

<script>
export default {
  name: "PaasNumber",
  inheritAttrs: false,
  computed: {
    see() {
      return this.$store?.forms?.see || false;
    }
  },
  props: {
    placeholder: String,
    modelValue: [String, Number],
    readonly: Boolean,
    disabled: {
      type: Boolean,
      default: false
    },
    min: Number,
    max: Number,
    style: { type: [String, Object], default: "width: 100%;" }
  },
  computed: {
    innerValue: {
      get() {
        return this.modelValue;
      },
      set(val) {
        this.$emit("update:modelValue", val);
      },
    },
  },
};
</script>