Vue basics — use component in other component

后端 未结 1 779
说谎
说谎 2021-01-21 08:56

I\'m trying to use a Vue component (a header) inside of another component, but it\'s not rendering it correctly.

My code:

App.vue:



        
相关标签:
1条回答
  • 2021-01-21 09:30

    You cannot name a component with the name of an existing HTML tag. The development version of Vue will warn you of this in the console.

    [Vue warn]: Do not use built-in or reserved HTML elements as component id: header

    Rename your header component with some other name.

    0 讨论(0)
提交回复
热议问题