a small relational database with user-editable schema for manual data entry
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yopa/yopa-web/resources/src/components/DecimalValue.vue

32 lines
499 B

<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" type="number" :id="id" step="any" v-model="inputValue">
</template>