Answer the question
In order to leave comments, you need to log in
How to run vue.js method on block load?
For example, I have a block
<div onload="foo()">
</div>
Answer the question
In order to leave comments, you need to log in
Make this block a component, and put the code from foo() into the mounted() method.
Only if you catch it through computed, he asked himself this question, it won’t work through: onload, tk. loop everything.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question