You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defineModel can show documentation when lsp hover.
What is actually happening?
<template>
<!-- using defineModel, nothing shown for v-model, mood props is fine -->
<Compv-model="msg"mood="happy" />
<!-- using defineModel, only type shown for :model-value, mood props is fine -->
<Comp:model-value="msg"mood="happy" />
<!-- using defineProps + defineEmits. using v-model syntax sugar, no docs for v-model-->
<Comp2v-model="msg" />
<!--using defineProps + defineEmits. using non syntax sugar, model-value documents is fine-->
<Comp2:model-value="msg"@update:model-value="void"/>
</template>
The text was updated successfully, but these errors were encountered:
Thanks for the quick rely. Yes, you are right. Newer language tools version supports it. There might be a usability issue limited by the v-model interface , I have to focus on the equal sign after v-model in Neovim and Vscode. I think because v-model has its own description.
Also, if we build it as library. the type definition will not include the documentation for defineModel from d.ts file, after build as library with emited type. go to definition on v-model:model-value or v-model(equal sign) went to a type line as below. But everything works as expected with defineProps.
Can you help reopen if you think this is something it should be fixed?
Here is what go to definition from my v-model line take me to my SFC.vue.d.ts after build.
Vue version
3.5
Link to minimal reproduction
SFC Playground
Steps to reproduce
see SFC playground
What is expected?
defineModel can show documentation when lsp hover.
What is actually happening?
The text was updated successfully, but these errors were encountered: