You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
481 B
23 lines
481 B
|
7 months ago
|
const $globalConfigure = (callback, data) => {
|
||
|
|
const { subMsgKey = "" } = $globalStore.useCommon;
|
||
|
|
if (subMsgKey) {
|
||
|
|
$globalEventBus.on(subMsgKey, ($event) => {
|
||
|
|
if (
|
||
|
|
callback &&
|
||
|
|
Object.prototype.toString.call(callback) === "[object Function]"
|
||
|
|
) {
|
||
|
|
callback({
|
||
|
|
subMsgKey,
|
||
|
|
event: $event,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
});
|
||
|
|
} else {
|
||
|
|
callback &&
|
||
|
|
Object.prototype.toString.call(callback) === "[object Function]" &&
|
||
|
|
callback({});
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
export { $globalConfigure };
|