fix: 修复 CompactTableShell 组件的样式,确保表格在小屏幕上可滚动

This commit is contained in:
2026-07-17 10:43:16 +08:00
parent 9d341bd4d4
commit 4eb4f6f2fc
2 changed files with 78 additions and 14 deletions

View File

@@ -8,8 +8,8 @@ type CompactTableShellProps = {
};
export const CompactTableShell: React.FC<CompactTableShellProps> = ({ children, colWidths }) => (
<div className="rounded-xl border border-gray-200 bg-white overflow-hidden">
<div className="overflow-hidden">
<div className="rounded-xl border border-gray-200 bg-white">
<div className="overflow-x-auto">
<table className="table-auto table-fixed w-full min-w-0 [&_th]:py-1.5 [&_th]:px-2 [&_th]:text-center [&_td]:py-1.5 [&_td]:px-2 [&_td]:text-center">
{colWidths && colWidths.length > 0 && (
<colgroup>