Skip to content

template with v-for and index does not recognise :key="index" #3139

@jfrs

Description

@jfrs

Doing something like this

  <template v-for="(test, index) in ['a', 'b', 'c']" :key="index">
    <div>{{ test }}</div>
  </template>

results in 'index' is declared but its value is never read.ts(6133) and there is no IntelliSense on :key="index".

Vue 3.2.47, Volar 1.6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsgood reproduction ✨This issue provides a good reproduction, we will be able to investigate it first

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions