Skip to content

Commit 3626b9d

Browse files
committed
Merge branch 'develop'
2 parents 385b7cc + b0ae24e commit 3626b9d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-module-loader",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Let you use the micro front-end architecture to build Vue applications.",
55
"author": "mqhe2007 <122274389@qq.com>",
66
"homepage": "https://mengqinghe.com",

src/ability/eventBus.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export default function() {
77
* @param {any} payload 事件载荷
88
*/
99
emit(eventName, payload) {
10+
if (!events[eventName])
11+
return console.warn(
12+
`${eventName}事件触发了,但是没有监听者,什么都不会发生。`
13+
)
1014
for (let func of events[eventName].values()) {
1115
func(payload)
1216
}

0 commit comments

Comments
 (0)