feat(Input): adjust style & add enter event

This commit is contained in:
Hakadao
2023-08-16 23:02:25 +08:00
parent 33a30a6731
commit 9e36f80da7

View File

@@ -6,7 +6,7 @@ interface Props {
}
const props = withDefaults(defineProps<Props>(), { size: 'medium' })
defineEmits(['update:modelValue'])
defineEmits(['update:modelValue', 'enter'])
const modelValue = ref<string>('')
@@ -18,11 +18,12 @@ onMounted(() => {
<template>
<input
v-model="modelValue" type="text" class="b-input"
p="x-4 y-2" border="1px transparent focus:$bew-theme-color"
p="x-4 y-2"
rounded="$bew-radius" outline-none transition-all duration-300
bg="$bew-fill-1"
focus:shadow focus:ring="2px $bew-theme-color"
@input="$emit('update:modelValue', $event!.target!.value)"
@keydown.enter="$emit('enter')"
>
</template>