refactor(ui): 統一 ActivityDetailDialog 滾動行為

- 移除 ScrollArea,改用原生的 overflow-y-auto 於 DialogContent

- 參考 VendorDialog 與 ProductDialog 的標準實作方式
This commit is contained in:
2026-01-19 15:38:44 +08:00
parent f83baffddb
commit 6bd52fe3db

View File

@@ -5,7 +5,6 @@ import {
DialogTitle, DialogTitle,
} from "@/Components/ui/dialog"; } from "@/Components/ui/dialog";
import { Badge } from "@/Components/ui/badge"; import { Badge } from "@/Components/ui/badge";
import { ScrollArea } from "@/Components/ui/scroll-area";
import { import {
Table, Table,
TableBody, TableBody,
@@ -237,7 +236,7 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P
return ( return (
<Dialog open={open} onOpenChange={onOpenChange}> <Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-3xl max-h-[90vh] flex flex-col p-0 gap-0 overflow-hidden"> <DialogContent className="max-w-3xl max-h-[90vh] overflow-y-auto p-0 gap-0">
<DialogHeader className="p-6 pb-4 border-b pr-12"> <DialogHeader className="p-6 pb-4 border-b pr-12">
<div className="flex items-center gap-3 mb-2"> <div className="flex items-center gap-3 mb-2">
<DialogTitle className="text-xl font-bold text-gray-900"> <DialogTitle className="text-xl font-bold text-gray-900">
@@ -276,8 +275,7 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P
</div> </div>
</DialogHeader> </DialogHeader>
<div className="flex-1 overflow-hidden bg-gray-50/50"> <div className="bg-gray-50/50 p-6 min-h-[300px]">
<ScrollArea className="h-full w-full p-6">
{activity.event === 'created' ? ( {activity.event === 'created' ? (
<div className="border rounded-md overflow-hidden bg-white shadow-sm"> <div className="border rounded-md overflow-hidden bg-white shadow-sm">
<Table> <Table>
@@ -432,7 +430,6 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P
</div> </div>
</div> </div>
)} )}
</ScrollArea>
</div> </div>
</DialogContent> </DialogContent>
</Dialog> </Dialog>