//创建全局组件使用component方法,第一个参数是组件名,第二个配置
        //只要创建全局组件,可以在任意地方的template中使用
        Vue.component('Vheader', {
            template: `
                <div>
                    我是导航组件
                </div>
            `
        })

 

相关文章:

  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
  • 2021-07-02
猜你喜欢
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-03-19
  • 2021-04-20
相关资源
相似解决方案