Open Pentadome opened 2 months ago
Is this the recommended usage? I'd rather do this with defineModel
:
<script setup lang="ts">
const modelValue = defineModel<string>();
</script>
<template>
<input @input="modelValue = $event.target.value" />
<!-- or even better: -->
<input v-model="modelValue" />
</template>
What did you do?
This causes warning/error:
The "update:modelValue" event has been triggered but not declared on
defineEmits.