摘要: 自定义指令 全局注册 //在main.js中 Vue.directive('指令名', { "inserted" (el) { // 可以对 el 标签,扩展额外功能 el.focus() } }) 局部注册 //在Vue组件的配置项中 directives: { "指令名": { inserted 阅读全文
posted @ 2025-06-07 22:32 技术蓝鱼 阅读(43) 评论(0) 推荐(0)