fix: add textarea autofocus

pull/165/head
tjz 2018-06-10 10:26:03 +08:00
parent 1297dac4c9
commit abd5ff9043
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) {