Skip to content

Commit 58d2d09

Browse files
committed
feat: add test_decimal field to cars model and update related components
1 parent b284582 commit 58d2d09

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

adminforth/spa/src/components/ColumnValueInput.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,22 @@
9595
type="text"
9696
inputmode="decimal"
9797
class="w-40"
98+
placeholder="0.0"
99+
:fullWidth="true"
100+
:prefix="column.inputPrefix"
101+
:suffix="column.inputSuffix"
98102
:modelValue="isEditing ? value : cleanDecimalValue(value)"
99103
@focus="() => {
100104
isEditing = true;
101105
$emit('update:modelValue', cleanDecimalValue(value));
102106
}"
103-
@update:modelValue="val => $emit('update:modelValue', val.replace(',', '.').replace(/[^\d.]/g, ''))"
107+
@update:modelValue="(val: string) => $emit('update:modelValue', val.replace(',', '.').replace(/[^\d.]/g, ''))"
104108
@blur="() => {
105109
isEditing = false;
106110
$emit('update:modelValue', cleanDecimalValue(value));
107-
}"
111+
}"
108112
/>
109-
<Input
113+
<Input
110114
v-else-if="(type || column.type) === 'float'"
111115
ref="input"
112116
type="number"

0 commit comments

Comments
 (0)