Home > Software design >  Go To definition does not work in same file with VSCODE VETUR
Go To definition does not work in same file with VSCODE VETUR

Time:02-15

My vue.js configuration is

  • vue.js 2.0
  • use vue.cli
  • webpack
  • javascript not typescript
  • use multiple root
    • server : server project
    • client/dashboard : web client project(this is vue project)

On follow code, "go definition" does not work with "could not find definition"

<template>
<div>
<button @click="clickEvent"/>
</div>
</template>

<script>
export default {
  ...
  methods: {
    clickEvent() {
      this.function1()
      ...
    },
    function1() {
      ...
    }
  }
  ...
}
</script>
  • when go to definition on @click="clickEvent"
  • when go to definition on this.function1()
  • computed, props is same

CodePudding user response:

vetur is look like no this function. Maybe you can try use vue-helper.

enter image description here

  • Related