vue-helper 点击跳转插件 在 methods里面互相调用函数,会产生两个函数definitions ,然后就回弹出框让你选择,解决方案是加配置

vue-helper 点击跳转插件 在 methods里面互相调用函数,会产生两个函数definitions ,然后就回弹出框让你选择

原因:换了台电脑,又从新配置下vscode

"editor.gotoLocation.multipleTypeDefinitions": "goto",
  "editor.gotoLocation.multipleReferences": "goto",
  "editor.gotoLocation.multipleDefinitions": "goto",
  "editor.gotoLocation.multipleImplementations": "goto",
  "editor.gotoLocation.multipleDeclarations": "goto",

写下原因:

vue文件在vscode里面 本身函数之间是支持跳转的,也就是vue的methods里面的函数之间是支持跳转的。
而,template里面和 script 里面是不能相互联动的。

vue-helper 插件就进行的 全部的函数定义,这样在template与script之间就进行了关联,而script内部就进行了 2次 定义,一次是vscode本身的定义,一次是vue-helper,所以就出现了,methods里面内部 函数调用函数就产生了两个定义。

我们把vscode的editor的多定义,设置成为goto直接跳转第一个,就ok了。

posted @ 2024-01-23 15:34  彭成刚  阅读(234)  评论(0编辑  收藏  举报