[Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement. warn$1 @ VM32:3 #185
Unanswered
maxiaoma12
asked this question in
Q&A
Replies: 1 comment
-
Hi, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,the onMounted is not work in .vue files.
The error message like this:
[Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement. warn$1 @ VM32:3
How can I use onMounted or getCurrentInstance in .vue files.
If I use getCurrentInstance like this,it's return null;
Beta Was this translation helpful? Give feedback.
All reactions