UNPKG

m2-mobui

Version:

The package is provided web components and utilities based on vue and element-ui.

29 lines (20 loc) 669 B
'use strict'; exports.__esModule = true; var _m2Core = require('m2-core'); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var EventBus = function () { function EventBus() { _classCallCheck(this, EventBus); } EventBus.prototype.$on = function $on(name, fn) { _m2Core.DataBus.on(name, fn); }; EventBus.prototype.$emit = function $emit(name, args) { _m2Core.DataBus.emit(name, args); }; EventBus.prototype.$off = function $off(name, fn) { _m2Core.DataBus.off(name, fn); }; return EventBus; }(); exports.default = EventBus;