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.
30 lines
893 B
30 lines
893 B
import { watch, unref } from 'vue';
|
|
import './hooks/index.mjs';
|
|
import { isNumber } from './utils/util.mjs';
|
|
import { PopupManager } from './utils/popup-manager.mjs';
|
|
import { version } from './version.mjs';
|
|
import { provideGlobalConfig } from './hooks/use-global-config/index.mjs';
|
|
|
|
const INSTALLED_KEY = Symbol("INSTALLED_KEY");
|
|
const makeInstaller = (components = []) => {
|
|
const install = (app, options = {}) => {
|
|
if (app[INSTALLED_KEY])
|
|
return;
|
|
app[INSTALLED_KEY] = true;
|
|
components.forEach((c) => app.use(c));
|
|
provideGlobalConfig(options, app);
|
|
watch(() => unref(options).zIndex, () => {
|
|
const zIndex = unref(options).zIndex;
|
|
if (isNumber(zIndex))
|
|
PopupManager.globalInitialZIndex = zIndex;
|
|
}, { immediate: true });
|
|
};
|
|
return {
|
|
version,
|
|
install
|
|
};
|
|
};
|
|
|
|
export { makeInstaller };
|
|
//# sourceMappingURL=make-installer.mjs.map
|