安全管理视频处理
This commit is contained in:
18
src/utils/eventBus.js
Normal file
18
src/utils/eventBus.js
Normal file
@ -0,0 +1,18 @@
|
||||
// units/bus.js
|
||||
const install = Vue => {
|
||||
const Bus = new Vue({
|
||||
methods: {
|
||||
on(event, ...args) {
|
||||
this.$on(event, ...args);
|
||||
},
|
||||
emit(event, callback) {
|
||||
this.$emit(event, callback);
|
||||
},
|
||||
off(event, callback) {
|
||||
this.$off(event, callback);
|
||||
}
|
||||
}
|
||||
});
|
||||
Vue.prototype.$bus = Bus;
|
||||
};
|
||||
export default install;
|
Reference in New Issue
Block a user