Created
January 29, 2020 10:26
-
-
Save Bachana123/72858b52114d2294eaa1fc8e5bb3d089 to your computer and use it in GitHub Desktop.
TEXT AREA automatic height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textArea() { | |
var height = this.$refs.textArea.scrollHeight | |
this.$refs.textArea.style.cssText = Math.floor(height/22) >= 2 ? 'height:' + 42 + 'px' : 'height: 22px' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment