fix: overlay zIndex (#109)

This commit is contained in:
Hayden
2025-02-01 11:55:58 +08:00
committed by GitHub
parent e7e2f4ce78
commit e5d9950429

View File

@@ -11,7 +11,8 @@
:max-width="item.maxWidth"
:min-height="item.minHeight"
:max-height="item.maxHeight"
:z-index="baseZIndex + index + 1"
:auto-z-index="false"
:pt:mask:style="{ zIndex: baseZIndex + index + 1 }"
:pt:root:onMousedown="() => rise(item)"
@hide="() => close(item)"
>
@@ -43,7 +44,7 @@ import ResponseDialog from 'components/ResponseDialog.vue'
import { useDialog } from 'hooks/dialog'
import Button from 'primevue/button'
import { usePrimeVue } from 'primevue/config'
import { computed } from 'vue'
import { computed, onMounted } from 'vue'
const { stack, rise, close } = useDialog()
@@ -52,4 +53,10 @@ const { config } = usePrimeVue()
const baseZIndex = computed(() => {
return config.zIndex?.modal ?? 1100
})
onMounted(() => {
for (const key in config.zIndex) {
config.zIndex[key] = baseZIndex.value
}
})
</script>