feat: 客户列表展示全部字段并加斑马纹/网格线
- 列表补齐结算人、产品明细、押金、买断、备注,按业务顺序排列 - 长文本列(产品明细/备注)换行完整显示 - Table 组件新增可选 striped/bordered,仅客户列表启用 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,10 +2,27 @@ import * as React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
/** 统一表格外观:外层 Card 内使用 */
|
||||
export function Table({ className, ...props }: React.TableHTMLAttributes<HTMLTableElement>) {
|
||||
export function Table({
|
||||
className,
|
||||
striped,
|
||||
bordered,
|
||||
...props
|
||||
}: React.TableHTMLAttributes<HTMLTableElement> & {
|
||||
striped?: boolean;
|
||||
bordered?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div className="w-full overflow-x-auto">
|
||||
<table className={cn("w-full text-sm", className)} {...props} />
|
||||
<table
|
||||
className={cn(
|
||||
"w-full 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",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user