How does vue3 get the vue instance in non-vue file? #8504
Unanswered
alamhubb
asked this question in
Help/Questions
Replies: 1 comment 12 replies
-
getCurrentInstance works in non-vue files. |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to develop a tool class. The tool class provides a method to return the current vue instance. How to achieve it?
Neither useRouter nor getCurrentInstance will work in non-Vue files
I figured it out, because there will be many vue instances in the current route, and I don’t know which one to return, so the returned value is null
But what I really want to ask is how to get the vue instance of the current routing interface
Beta Was this translation helpful? Give feedback.
All reactions