Problem Description:
The component is imported, registered in components, and used in the template, but still reports an error: error The “AlarmList” component has been registered but not used, the component is registered, but not used.
Solution:
Under the root path of the vue project, create a vue.config.js file (note that this file should be in the same directory as package.json), and write the following code in the file, module.exports = { lintOnSave:
false , // Turn off the eslint syntax verification rule runtimeCompiler: true, // Use the Vue kernel version that includes the runtime compiler } Then save it and restart the project.
After the solution, if the routing rules are still red, but no more errors
Solution:
Check whether there is this component in your own components, and you can disable it