Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dialog): 修复弹出对话框时无法移动窗口的问题 #277

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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