Skip to content

JsDoc Unable to document v-model #13179

@pwang2

Description

@pwang2

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?

<template>
  <!-- using defineModel, nothing shown for v-model, mood props is fine -->
  <Comp v-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-->
  <Comp2 v-model="msg" />

  <!--using defineProps + defineEmits.  using non syntax sugar, model-value documents is fine-->
  <Comp2 :model-value="msg" @update:model-value="void"/>
</template>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions