摘要: 方法一:自定义指令 // 自定义聚焦指令 Vue.directive('focus1', { // 指令的定义 inserted: function (el) { // 聚焦元素 el.querySelector('input').focus() } })//使用方法<el-input v-focu 阅读全文
posted @ 2022-07-07 09:20 爱尚丽明 阅读(679) 评论(0) 推荐(0)