Reputation: 321
// src/ui/tabbar/Index.vue
<template>
<div>
my-tabbar
</div>
</template>
// src/ui/index.js
import MyTabbar from './tabbar/Index.vue'
export default {
install(Vue) {
Vue.component(MyTabbar.name, MyTabbar)
}
}
// src/main.js
import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false
Vue.use(ui)
new Vue({
render: (h) => h(App)
}).$mount('#app')
// src/App.vue
<template>
// [ctrl + click] my-tabbar tips no definition found for 'my-tabbar'
<my-tabbar>/<my-tabbar>
</template>
vscode [ctrl+click] 'vue single-file components', 'go to definition' not working
How can I [ctrl + click] to jump to 'src/ui/tabbar/Index.vue'
Can you tell me anything you know? thank you!!!
Upvotes: 16
Views: 5996
Reputation: 1
I am using Volar but it seems the Material Theme plugin that i was using was causing an issue with go to definition for components. So I did uninstall the Material Theme plugin that i was using and solved the issue now i can go to definitions of components.
Upvotes: 0
Reputation: 341
Both vue-helper and Vetur-extended seems to work.
I personally prefer Vetur-extended because it seems a bit faster than the vue-helper.
Upvotes: 4