el-button autofocus 无效(解决办法)
2021-05-12 10:30 罗任德 阅读(2141) 评论(0) 编辑 收藏 举报<el-button type="primary" autofocus="true" v-focus round plain>日常检查</el-button>
1 directives: { 2 focus: { 3 inserted: function(el) { 4 el.focus(); 5 } 6 } 7 }
上面的方法就可以达到我开始想要的效果 ( v-focus )