fix: add textarea autofocus

pull/77/merge
tjz 2018-06-10 10:26:03 +08:00
parent 3cff62997d
commit 7879279123
1 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,12 @@ export default {
},
},
mounted () {
this.resizeTextarea()
this.$nextTick(() => {
this.resizeTextarea()
if (this.autoFocus) {
this.focus()
}
})
},
methods: {
handleKeyDown (e) {