Working with textarea in Vue
Working with textarea is exactly the same as with inputs - through the v-model directive. Let's see in practice. Let's make a property that we will bind to our tag:
data() {
return {
text: '',
}
}
Let's bind the property to the tag:
<template>
<textarea v-model="text"></textarea>
</template>
Let's also create a paragraph in which the entered text will be displayed:
<template>
<textarea v-model="text"></textarea>
<p>{{ text }}</p>
</template>
Given textarea. Make it so that when you type text in this textarea, this text is simultaneously displayed in the paragraph below it.
The button textarea is given. Text is entered into it. By clicking on the button, you will receive an array of entered words and output the elements of this array as a list ul.