Skip to content

Commit abd5ff9

Browse files
committed
fix: add textarea autofocus
1 parent 1297dac commit abd5ff9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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)