From 5e2a6adf06dfe9f6ebe37bdf91b6bfa471a5c96e Mon Sep 17 00:00:00 2001 From: Trae Assistant Date: Mon, 5 Oct 2026 08:30:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20DataTable=20title=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=94=AF=E6=8C=81=20ReactNode=20=E4=BB=A5?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E5=A4=8D=E9=80=89=E6=A1=86=E8=A1=A8=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DataTable Column.title 类型由 string 扩展为 string | ReactNode - 与 Users 列表的全选表头(复选框+计数)兼容,修复 tsc 编译错误 TS2322 - npm run build 通过(tsc -b + vite build exit 0) --- client/src/components/DataTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/DataTable.tsx b/client/src/components/DataTable.tsx index 37f89c1..d8bee08 100644 --- a/client/src/components/DataTable.tsx +++ b/client/src/components/DataTable.tsx @@ -2,7 +2,7 @@ import { ReactNode } from 'react'; interface Column { key: string; - title: string; + title: string | ReactNode; width?: string; render?: (row: T, index: number) => ReactNode; }