mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -707,6 +707,7 @@ kit.config = kit.config || {};
|
||||
* @typedef PluginManager.register
|
||||
* @param pluginId
|
||||
* @param config
|
||||
* @return Plugin
|
||||
*/
|
||||
PluginManager.prototype.register = function (pluginId, config = {}) {
|
||||
if(typeof pluginId !== 'string' || pluginId === ''){
|
||||
@@ -721,6 +722,7 @@ kit.config = kit.config || {};
|
||||
plugin.setPluginManager(this);
|
||||
this.plugins[pluginId] = plugin;
|
||||
}
|
||||
return plugin;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1102,12 +1104,16 @@ kit.config = kit.config || {};
|
||||
if(typeof window === 'object'){
|
||||
window.__pmConfig__ = global.config;
|
||||
}
|
||||
module.exports = global.config;
|
||||
},
|
||||
onInstall: function(plugin){
|
||||
if(typeof window === 'object'){
|
||||
if(window.hasOwnProperty('__PluginManagerConfigHandler__') && typeof __PluginManagerConfigHandler__ === 'function'){
|
||||
manager.registerPlugins(__PluginManagerConfigHandler__());
|
||||
}
|
||||
if (Array.isArray(plugin?.module?.exports?.autoloadPluginList)) {
|
||||
manager.exec(plugin.module.exports.autoloadPluginList);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user