<script>
export default {
  name: "DecimalValue",
  props: {
    id: {
      type: String,
      default: '',
    },
    value: Object
  },
  methods: {
    focus() {
      this.$refs.input.focus();
    }
  },
  computed: {
    inputValue: {
      set(value) {
        this.value.Decimal = parseFloat(value);
      },
      get() {
        return this.value.Decimal;
      }
    }
  }
};
</script>

<template>
  <input ref="input" class="form-input input-inline" type="number" :id="id" step="any" v-model="inputValue">
</template>
