feat(ui): 适配手机端布局与触控交互

窄屏改用抽屉导航和卡片列表,加大触控区域并处理安全区,避免表格横向溢出。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-29 21:55:10 +08:00
co-authored by Cursor
parent 3535f56702
commit d981e53330
29 changed files with 519 additions and 202 deletions
+4 -4
View File
@@ -14,8 +14,8 @@ export function Table({
return (
<div className="w-full overflow-x-auto">
<table
className={cn(
"w-full text-sm",
className={cn(
"w-full min-w-max text-sm",
bordered &&
"border border-[var(--color-border)] [&_tr]:divide-x [&_tr]:divide-[var(--color-border)]",
striped && "[&_tbody_tr:nth-child(even)]:bg-[var(--color-muted)]/50",
@@ -46,9 +46,9 @@ export function TR({ className, ...props }: React.HTMLAttributes<HTMLTableRowEle
}
export function TH({ className, ...props }: React.ThHTMLAttributes<HTMLTableCellElement>) {
return <th className={cn("px-4 py-3 font-medium", className)} {...props} />;
return <th className={cn("px-3 py-2.5 font-medium md:px-4 md:py-3", className)} {...props} />;
}
export function TD({ className, ...props }: React.TdHTMLAttributes<HTMLTableCellElement>) {
return <td className={cn("px-4 py-3 align-middle", className)} {...props} />;
return <td className={cn("px-3 py-2.5 align-middle md:px-4 md:py-3", className)} {...props} />;
}