<input type="text" ref="input"/> <script> mounted(){ this.$refs['input'].focus(); } </script> 转载于:https://www.cnblogs.com/rachelch/p/7891698.html