摘要: 全局注册 方式一: 1.新建一个js文件,里面写自定义指令的方法类 2.引入到main.js中,里面注册全局指令 // 第一步 const focusDirective = { inserted(el) { el.focus(); }, } export default focusDirective 阅读全文
posted @ 2022-01-07 09:10 Jim-vue 阅读(4264) 评论(0) 推荐(0)