In the vue project, when the textarea gets the focus, change its height?

< div class= "text-box" >

<textarea class="comment" autocomplete="off"></textarea>
<button class="btn"> </button>
<span class="word"><span class="length">0</span>/140</span>

< / div >

clipboard.png
when textarea gets focus, change its height? And control the display and hiding of btn and word

Oct.11,2021

<textarea @focus="textareaFocus" @blur="textareaBlur" :style="{ height: height }"></textarea>

modify the height value in textareaFoucs and textareaBlur to control the height, and modify the variables that control the display and hiding of button.

Menu