Skip to content

Commit 3a3d2b4

Browse files
committed
chore: fix typescript errors in ColumnValueInput
1 parent 09f775a commit 3a3d2b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

adminforth/spa/src/components/ColumnValueInput.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
step="1"
6767
class="w-40"
6868
placeholder="0"
69+
:fullWidth="true"
6970
:min="![undefined, null].includes(column.minValue) ? column.minValue : ''"
7071
:max="![undefined, null].includes(column.maxValue) ? column.maxValue : ''"
7172
:prefix="column.inputPrefix"
@@ -90,6 +91,7 @@
9091
step="0.1"
9192
class="w-40"
9293
placeholder="0.0"
94+
:fullWidth="true"
9395
:min="![undefined, null].includes(column.minValue) ? column.minValue : ''"
9496
:max="![undefined, null].includes(column.maxValue) ? column.maxValue : ''"
9597
:prefix="column.inputPrefix"
@@ -104,7 +106,7 @@
104106
class="bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-lg block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
105107
:placeholder="$t('Text')"
106108
:value="value"
107-
@input="$emit('update:modelValue', $event.target.value)"
109+
@input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
108110
:readonly="(column.editReadonly && source === 'edit') || readonly"
109111
/>
110112
<textarea
@@ -113,13 +115,14 @@
113115
class="bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-lg block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
114116
:placeholder="$t('Text')"
115117
:value="value"
116-
@input="$emit('update:modelValue', $event.target.value)"
118+
@input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
117119
/>
118120
<Input
119121
v-else
120122
ref="input"
121123
:type="!column.masked || unmasked[column.name] ? 'text' : 'password'"
122124
class="w-full"
125+
:fullWidth="true"
123126
:placeholder="$t('Text')"
124127
:prefix="column.inputPrefix"
125128
:suffix="column.inputSuffix"
@@ -190,7 +193,7 @@
190193
const onSearchInput = inject('onSearchInput', {} as any);
191194
const loadMoreOptions = inject('loadMoreOptions', (() => {}) as any);
192195
193-
const input = ref(null);
196+
const input = ref<HTMLInputElement | null>(null);
194197
195198
const getBooleanOptions = (column: any) => {
196199
const options: Array<{ label: string; value: boolean | null }> = [

0 commit comments

Comments
 (0)