Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

Fix: 修复图片预览弹窗层级

zipg134116bb2313
diff --git a/apps/desktop/src/components/grid/ImagePreviewDialog.vue b/apps/desktop/src/components/grid/ImagePreviewDialog.vue
index 5fa26d5835..7651fe110a 100644
--- a/apps/desktop/src/components/grid/ImagePreviewDialog.vue
+++ b/apps/desktop/src/components/grid/ImagePreviewDialog.vue
@@ -180,7 +180,14 @@ onUnmounted(() => {
<template>
<Dialog :open="open" @update:open="(value) => emit('update:open', value)">
- <DialogContent :show-close-button="false" class="image-preview-dialog !flex !max-w-[92vw] flex-col gap-0 overflow-hidden rounded-xl border-white/10 bg-[#090b0f] p-0 text-white shadow-2xl sm:!max-w-[92vw]" :style="dialogStyle" @escape-key-down="close">
+ <DialogContent
+ :show-close-button="false"
+ overlay-class="!z-[80]"
+ portal-class="!z-[81]"
+ class="image-preview-dialog !flex !max-w-[92vw] flex-col gap-0 overflow-hidden rounded-xl border-white/10 bg-[#090b0f] p-0 text-white shadow-2xl sm:!max-w-[92vw]"
+ :style="dialogStyle"
+ @escape-key-down="close"
+ >
<div class="flex h-12 shrink-0 items-center gap-3 border-b border-white/10 bg-white/[0.035] px-4">
<div class="min-w-0 flex-1">
<DialogTitle class="truncate text-sm font-semibold text-white">{{ imageTitle }}</DialogTitle>
diff --git a/apps/desktop/src/components/ui/dialog/DialogContent.vue b/apps/desktop/src/components/ui/dialog/DialogContent.vue
index fec83146cf..170f7c740d 100644
--- a/apps/desktop/src/components/ui/dialog/DialogContent.vue
+++ b/apps/desktop/src/components/ui/dialog/DialogContent.vue
@@ -13,20 +13,30 @@ defineOptions({
inheritAttrs: false,
});
-const props = withDefaults(defineProps<DialogContentProps & { class?: HTMLAttributes["class"]; showCloseButton?: boolean }>(), {
- showCloseButton: true,
-});
+const props = withDefaults(
+ defineProps<
+ DialogContentProps & {
+ class?: HTMLAttributes["class"];
+ overlayClass?: HTMLAttributes["class"];
+ portalClass?: HTMLAttributes["class"];
+ showCloseButton?: boolean;
+ }
+ >(),
+ {
+ showCloseButton: true,
+ },
+);
const emits = defineEmits<DialogContentEmits>();
-const delegatedProps = reactiveOmit(props, "class");
+const delegatedProps = reactiveOmit(props, "class", "overlayClass", "portalClass");
const forwarded = useForwardPropsEmits(delegatedProps, emits);
</script>
<template>
<DialogPortal>
- <DialogOverlay />
- <div class="fixed inset-0 z-50 grid place-items-center p-4 pointer-events-none">
+ <DialogOverlay :class="props.overlayClass" />
+ <div :class="cn('fixed inset-0 z-50 grid place-items-center p-4 pointer-events-none', props.portalClass)">
<DialogContent
data-slot="dialog-content"
v-bind="{ ...$attrs, ...forwarded }"