fix submit handler

This commit is contained in:
2025-06-18 16:00:20 +02:00
parent 78036f9aea
commit 62ddc33290
15 changed files with 73 additions and 45 deletions

View File

@ -22,9 +22,10 @@
:placeholder="placeholder || label"
:readonly="read_only"
:type
class="ps-3"
class="ps-2"
ref="inputRef"
v-model="input"
@keyup="(e) => $emit('keyup', e)"
/>
<label
:for="id"
@ -80,6 +81,11 @@ const input = defineModel<string | number | undefined | null>({
const inputRef = useTemplateRef('inputRef')
defineExpose({ inputRef })
const emit = defineEmits<{
error: [string[]]
keyup: [KeyboardEvent]
}>()
const props = defineProps({
placeholder: {
type: String,
@ -148,8 +154,6 @@ watch(
},
)
const emit = defineEmits(['error'])
const checkInput = () => {
if (props.rules) {
const result = props.rules.safeParse(input.value)