当组件名和自定义指令名重名时无法正常使用该指令(Vite+Vue3+ElementPlus)
zaeyee opened this issue · comments
Please provide a minimum reproduction repo.
我也遇到了同样的问题,我看看能不能提供个最小成本复现吧
Please provide a minimum reproduction repo.
https://github.com/hooray/unplugin-vue-components-directives
可以看这个仓库,首先有一个 Auth 组件,然后当 directives: true
时,v-auth
无法正常被注册,当 directives: false
时,v-auth
正常注册,并且触发时在控制台有内容输出
Please provide a minimum reproduction repo.
https://github.com/hooray/unplugin-vue-components-directives
可以看这个仓库,首先有一个 Auth 组件,然后当directives: true
时,v-auth
无法正常被注册,当directives: false
时,v-auth
正常注册,并且触发时在控制台有内容输出
感谢提供,我最近比较忙,没注意到回复,你提供的代码没问题,感谢感谢!
是否有必要添加一个directives的目录的配置项,来搜索里面自定义指令函数并引入,类似unplugin-auto-import。