eventBus.js
import Vue from 'vue'
// 用于监听、触发事件
export default new Vue()
A.vue 与 B.vue 非父子关系
A.vue
eventBus.$emit('move', curY - startY > 0, curX - startX > 0)
B.vue
eventBus.$on('move', (isDownward, isRightward) => {
this.showLine(isDownward, isRightward)
})