diff --git a/adminforth/spa/src/components/ColumnValueInput.vue b/adminforth/spa/src/components/ColumnValueInput.vue index 8cf51490..b76a21e9 100644 --- a/adminforth/spa/src/components/ColumnValueInput.vue +++ b/adminforth/spa/src/components/ColumnValueInput.vue @@ -99,8 +99,8 @@ :fullWidth="true" :prefix="column.inputPrefix" :suffix="column.inputSuffix" - :modelValue="String(value)" - @update:modelValue="$emit('update:modelValue', String($event))" + :modelValue="value?.toString().replace(/(\.[0-9]*[1-9])0+$|\.0+$/, '$1')" + @update:modelValue="(val: string | number) => $emit('update:modelValue', val !== null ? String(val) : '')" /> {}) as any); const input = ref(null); - const getBooleanOptions = (column: any) => { const options: Array<{ label: string; value: boolean | null }> = [ { label: t('Yes'), value: true },