Skip to content

Commit

Permalink
fix(dialog): 修复弹出对话框时无法移动窗口的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
neooier committed Jan 25, 2025
1 parent 91c7926 commit a25289b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/utils/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ export namespace Dialog {
);
});
}
export function BackDrop() {
return (
<div
data-tauri-drag-region
className={cn(
"hover:cursor-move active:scale-100 active:cursor-grabbing",
"fixed left-0 top-0 z-[100] h-full w-full bg-black/0 backdrop-blur-0",
{
"bg-black/70 !backdrop-blur-lg": show,
},
)}
></div>
);
}

function Component({
title = "",
Expand Down Expand Up @@ -141,14 +155,7 @@ export namespace Dialog {
))}
</div>
</div>
<div
className={cn(
"fixed left-0 top-0 z-[100] h-full w-full bg-black/0 backdrop-blur-0",
{
"bg-black/70 !backdrop-blur-lg": show,
},
)}
></div>
<BackDrop />
</>
);
}
Expand Down

0 comments on commit a25289b

Please sign in to comment.