This commit is contained in:
2026-07-02 00:34:07 +03:30
parent e097f6b2bb
commit a41dd6ef9e
12 changed files with 93 additions and 26 deletions
+5 -2
View File
@@ -13,6 +13,7 @@
:size="props.size"
:type="props.type"
class=""
@input="handlerChange"
@change="handlerChange"
/>
<a-input
@@ -27,6 +28,7 @@
:inputmode="props.inputmode"
:pattern="props.pattern"
class=""
@input="handlerChange"
@change="handlerChange"
/>
</div>
@@ -89,8 +91,9 @@ function normalizeValue(value: unknown) {
return normalized
}
const handlerChange = (e: any) => {
const normalized = normalizeValue(e.target.value)
const handlerChange = (e: Event | string) => {
const raw = typeof e === 'string' ? e : (e.target as HTMLInputElement | null)?.value
const normalized = normalizeValue(raw)
emits('update:value', normalized)
emits('onchange', normalized)
}