Answer the question
In order to leave comments, you need to log in
How to access DOM element with Vue?
For example, there is a component and this is what is in ittemplate
<div>
<textarea></textarea>
<span></span>
</div>
this.$el
I can access the whole root component, but how can I access only one textarea
autosize(document.querySelectorAll('textarea'))
Answer the question
In order to leave comments, you need to log in
<div>
<textarea ref="textarea"></textarea>
<span></span>
</div>
what are the best practices?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question