On the problem of component name in Vue

what is the role of the name property when novice vueci,vue components register

export default {
  name: "m-head",//name
  data () {
    return {
      name:""
    }
  },
}

however, when using

< H2 > js: < / H2 >
import Head from "./components/Head"
export default {
  name: "App",
  data () {
    return {
      name:"App"
    }
  },
  components: {
    new-head:Head  // name
  }
}
< H2 > html < / H2 >
<new-head></new-head>

clipboard.png


No one can tell exactly what this is for. The official website says
https://www.jb51.net/article/.
strongly recommends an article


to name a practical application. When keep-alive determines whether a component needs to be cached, When doing regular matching / name matching, the judgment is based on the name of the component.


https://cn.vuejs.org/v2/api/-sharp.

Menu