I'm currently exploring Vue's approach to writing JavaScript.
Let's consider this situation:
In the .vue template
<button v-on:click="biggerFont()" class="btn btn-s btn-default" type="button" name="button">A</button>
<div v-for="(tweet, index) in tweets">
<div class="each_tweet">
<textarea v-on:keyup="typing(index)"
v-model="tweet.content"
placeholder="What's happening now">{{ tweet.content }}</textarea>
</div>
</div>
In the .vue <script>
export default {
methods: {
biggerFont: function() {
//can I somehow use this.tweets.style.fontSize to influence all the fontSize?
document.getElementsByClassName("each_tweet").style.fontSize = "xx-large"
}
}
}
My inquiry is:
- How can I adjust the font size of each value in the textarea within
tweets
? Is there a standard Vue method for controlling these font sizes?
I attempted unsuccessfully with
document.getElementsByClassName.style.fontSize
, and it doesn't appear to align with the Vue methodology. Thank you!