mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 14:30:52 +01:00
fix submit handler
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="card">
|
||||
<div class="card min-w-56">
|
||||
<slot name="image" />
|
||||
|
||||
<div
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex items-center gap-4 relative">
|
||||
<div class="flex flex-wrap items-center gap-4 relative">
|
||||
<UiButton
|
||||
:style="{ 'background-color': model }"
|
||||
:class="[textColorClass]"
|
||||
|
||||
Reference in New Issue
Block a user