垮组件方法调用
eventBus.js
import Vue from 'vue'; const EventBus = new Vue() export { EventBus }
navHead.vue(收到通知 触发orderService.vue中的列表)
import {EventBus} from '@/utils/eventBus.js'
EventBus.$emit('upTable')
orderService.vue
import {EventBus} from '@/utils/eventBus.js'
created() { EventBus.$on('upTable', () => {this.getList(1) }) },