vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

Completion for local variables from v-for is not working #1373

Open bugproof opened 5 years ago

bugproof commented 5 years ago

Info

Problem

111

image

image

ktsn commented 5 years ago

Repro code:

<template>
  <div>
    <div v-for="item in list">
      {{ item.bar }}
    </div>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'

interface Foo {
  bar: string
}

export default Vue.extend({
  data: () => ({
    list: [] as Foo[]
  })
})
</script>

Looks like hover is also not working on local variables declared by v-for. => EDIT: filed #1374

ktsn commented 5 years ago

I realized that this issue is related with #1129