0
0
This commit is contained in:
syuilo 2023-01-02 13:23:12 +09:00
parent 7797e8b8b6
commit 5f611a9d9d
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const emit = defineEmits<{
}>(); }>();
let up = $ref(false); let up = $ref(false);
const zIndex = os.claimZIndex('high'); const zIndex = os.claimZIndex('veryLow');
onMounted(() => { onMounted(() => {
window.setTimeout(() => { window.setTimeout(() => {

View File

@ -153,11 +153,12 @@ export const popups = ref([]) as Ref<{
}[]>; }[]>;
const zIndexes = { const zIndexes = {
veryLow: 500000,
low: 1000000, low: 1000000,
middle: 2000000, middle: 2000000,
high: 3000000, high: 3000000,
}; };
export function claimZIndex(priority: 'low' | 'middle' | 'high' = 'low'): number { export function claimZIndex(priority: keyof typeof zIndexes = 'low'): number {
zIndexes[priority] += 100; zIndexes[priority] += 100;
return zIndexes[priority]; return zIndexes[priority];
} }