特牛网址导航

vue注册了组件未使用报错:component has been registered but not used-CSDN博客

网友收藏
在使用vue编写项目时,有时候修改了代码导致vue中注册的组件并没有在html中使用,这时候编译器会报错:*** component has been registered but not used报这个错误是因为eslint代码检查到你注册了组件但没有使用,然后就报错了,我们只需要将注册了却未使用的组件取消注册即可。但是我们有时候我们不想取消注册,希望也能编译通过,该怎么处理呢?有两种方式..._component has been registered but not used