We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What did you do?
<script setup lang="ts"> defineModel<string>(); </script> <template> <input @input="$emit('update:modelValue', $event.target.value)" /> </template>
This causes warning/error: The "update:modelValue" event has been triggered but not declared on defineEmits.
The "update:modelValue" event has been triggered but not declared on
.
The text was updated successfully, but these errors were encountered:
Is this the recommended usage? I'd rather do this with defineModel:
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>
Sorry, something went wrong.
No branches or pull requests
What did you do?
This causes warning/error:
The "update:modelValue" event has been triggered but not declared on
defineEmits.
The text was updated successfully, but these errors were encountered: