@opensig/opendesign
Version:
21 lines (20 loc) • 408 B
JavaScript
import { watchEffect } from "vue";
import { defaultZIndex } from "./global.mjs";
let topZIndex = 100;
watchEffect(() => {
topZIndex = defaultZIndex.value;
});
function createTopZIndex() {
topZIndex += 1;
return topZIndex;
}
function removeZIndex(current) {
if (current === void 0 || current === topZIndex) {
topZIndex -= 1;
}
return topZIndex;
}
export {
createTopZIndex,
removeZIndex
};