-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
2,853 additions
and
1,939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
dist/ | ||
__tests__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,57 @@ | ||
/** | ||
* vue-bus v1.1.0 | ||
/*! | ||
* vue-bus v1.2.1 | ||
* https://github.com/yangmingshan/vue-bus | ||
* @license MIT | ||
*/ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.VueBus = factory()); | ||
}(this, (function () { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = global || self, global.VueBus = factory()); | ||
}(this, function () { 'use strict'; | ||
|
||
function VueBus(Vue) { | ||
var bus = new Vue(); | ||
function VueBus(Vue) { | ||
var bus = new Vue(); | ||
|
||
Object.defineProperties(bus, { | ||
on: { | ||
get: function get() { | ||
return this.$on | ||
} | ||
}, | ||
once: { | ||
get: function get() { | ||
return this.$once | ||
Object.defineProperties(bus, { | ||
on: { | ||
get: function get() { | ||
return this.$on.bind(this) | ||
} | ||
}, | ||
once: { | ||
get: function get() { | ||
return this.$once.bind(this) | ||
} | ||
}, | ||
off: { | ||
get: function get() { | ||
return this.$off.bind(this) | ||
} | ||
}, | ||
emit: { | ||
get: function get() { | ||
return this.$emit.bind(this) | ||
} | ||
} | ||
}, | ||
off: { | ||
}); | ||
|
||
Object.defineProperty(Vue, 'bus', { | ||
get: function get() { | ||
return this.$off | ||
return bus | ||
} | ||
}, | ||
emit: { | ||
}); | ||
|
||
Object.defineProperty(Vue.prototype, '$bus', { | ||
get: function get() { | ||
return this.$emit | ||
return bus | ||
} | ||
} | ||
}); | ||
|
||
Vue.bus = bus; | ||
|
||
Object.defineProperty(Vue.prototype, '$bus', { | ||
get: function get() { | ||
return bus | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
if (typeof window !== 'undefined' && window.Vue) { | ||
window.Vue.use(VueBus); | ||
} | ||
if (typeof window !== 'undefined' && window.Vue) { | ||
window.Vue.use(VueBus); | ||
} | ||
|
||
return VueBus; | ||
return VueBus; | ||
|
||
}))); | ||
})); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.