Files
dsProject/dsBase/WebRoot/html/cdn/es/make-installer.mjs
2025-08-14 15:45:08 +08:00

30 lines
893 B
JavaScript

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