Fix typing errors
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
label: string;
|
||||
modelValue: string;
|
||||
}>();
|
||||
const emit = defineEmits<{
|
||||
(event: 'update:modelValue', value: string): void;
|
||||
}>();
|
||||
|
||||
const localValue = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:modelValue', value),
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -13,10 +20,9 @@ const emit = defineEmits<{
|
||||
<label class="block text-sm font-medium text-gray-700">{{ label }}</label>
|
||||
<div class="mt-1 relative rounded-md shadow-sm">
|
||||
<textarea
|
||||
v-model="localValue"
|
||||
class="focus:ring-blue-500 focus:border-blue-500 block w-full border-gray-300 rounded-md"
|
||||
:value="modelValue"
|
||||
v-bind="$attrs"
|
||||
@input="emit('update:modelValue', $event.target.value)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user