UNPKG

vue-admin-core

Version:
32 lines (28 loc) 980 B
'use strict'; var lodashEs = require('lodash-es'); require('./components/config-provider/index.js'); var version = require('./version.js'); var configProviderProps = require('./components/config-provider/src/config-provider-props.js'); var useGlobalConfig = require('./components/config-provider/src/hooks/use-global-config.js'); const INSTALLED_KEY = Symbol("CONFIGPROVIDERINSTALLED"); const makeInstaller = (components = []) => { const install = (app, options) => { if (app[INSTALLED_KEY]) return; app[INSTALLED_KEY] = true; components.forEach((c) => app.use(c)); if (options) { lodashEs.map(configProviderProps.configProviderProps, (value, key) => { if (!options[key]) options[key] = value.default; }); useGlobalConfig.provideGlobalConfig(options, app, true); } }; return { install, version: version.version }; }; exports.makeInstaller = makeInstaller; //# sourceMappingURL=make-installer.js.map