Skip to content

Commit 7879279

Browse files
committed
fix: add textarea autofocus
1 parent 3cff629 commit 7879279

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: components/input/TextArea.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ export default {
5555
},
5656
},
5757
mounted () {
58-
this.resizeTextarea()
58+
this.$nextTick(() => {
59+
this.resizeTextarea()
60+
if (this.autoFocus) {
61+
this.focus()
62+
}
63+
})
5964
},
6065
methods: {
6166
handleKeyDown (e) {

0 commit comments

Comments
 (0)