1//創建組件的構造器
var firstCPN= Vue.extend({
template:`<h2>我是組件</h2>`
});
//注冊組件
Vue.component('mycpn',firstCPN);注冊的是全局的組件,全局的組件可以在多個vue實例下使用
//使用組件
2 注冊局部的組件
//在這里注冊的組件就是局部組件,只能在當前vue的實例下使用
components:{
mycpn:firstCPN
}