2

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
김민석
  • 23
  • 3

3 Answers3

6

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

enter image description here

nononohup
  • 111
  • 5
0

Use vue-helper or Vetur-extended.

https://stackoverflow.com/a/76565821/13147506

Sandee007
  • 141
  • 2
  • 7
-1

You can try this extension: js-jumper

hoyche
  • 1