📅  最后修改于: 2022-03-11 15:03:02.397000             🧑  作者: Mango
Vue.component('component1', {
methods: {
c1method: function(){
alert('this is c1method')
},
}
})
Vue.component('component2', {
methods: {
c2method: function(){
component('component1').c1method()//like this
},
}
})