l-hammer/YDTemplate

View on GitHub
src/examples/app/bus.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * 事件总线bus,非父子间通信
 */
import Vue from 'vue/dist/vue';

export default new Vue({
  data() {
    return {
      globalLoading: true,
      gameInfo: {},
    };
  },
  methods: {
    updateLoading(val) {
      this.globalLoading = val;
    },
    updatedGameInfo(data) {
      this.gameInfo = data;
    },
  },
});