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.

29 lines
892 B

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var core = require('@vueuse/core');
var util = require('../../utils/util.js');
let cachedContainer;
const POPPER_CONTAINER_ID = `el-popper-container-${util.generateId()}`;
const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`;
const usePopperContainer = () => {
vue.onBeforeMount(() => {
if (!core.isClient)
return;
if (process.env.NODE_ENV === "test" || !cachedContainer) {
const container = document.createElement("div");
container.id = POPPER_CONTAINER_ID;
document.body.appendChild(container);
cachedContainer = container;
}
});
};
exports.POPPER_CONTAINER_ID = POPPER_CONTAINER_ID;
exports.POPPER_CONTAINER_SELECTOR = POPPER_CONTAINER_SELECTOR;
exports.usePopperContainer = usePopperContainer;
//# sourceMappingURL=index.js.map