Vue component reports an error:
[Vue warn]: Failed to mount component: template or render function not defined.
found in
—> & lt; Anonymous>
< App> at src/App.vue
< Root>
Error code:
Solution:
Change component to components
Modified code:
Why report an error
there is a pattern called named view in Vue router
Originally, only one routing view can correspond to one component in a page. Now, multiple routing views can correspond to multiple components.
When using multiple components, use components and write them in the form of objects
When using a single component, use component
More routing, component details: https://blog.csdn.net/xiaodi520520/article/details/88866427