Name in component

Vue.com Ponent (ID, [Definition]) is provided as the name of the component. The name will be overwritten by the name attribute in the component.

In general, the name of a component is not objectionable, and there is no significant difference whether it is written inside the component or not. For a page of views, the situation is different, the default is the file name as the name. If you use vue-DevTools, you’ll find a problem. If the entry index is in the page folder, you’ll find an Index component in DevTools.

That’s when you should use itnameAttribute overrides a meaningful identity

The name of the router

Refer to named routes. You can use name to identify routes. If you’re comfortable with $router.push(‘/path1’), you don’t need to set it.