DTStack / DTStack/dt-react-component

[Feature Request]: Table 组件目前不是全部兼容 antd

Offen
#662 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
106
Forks
42
Ø Merge
2 T. 6 Std.
Gemergte PRs (30 T.)
1

Beschreibung

### 功能

增强现有功能

### 详细描述

#### table
1. Table.Column 声明式写法失效
没传 columns 时,包装层会生成空数组并传给 antd,导致 antd 不再从 children 解析列。虽然静态 Table.Column 被导出了,但实际无法正常使用。见 src/table/index.tsx (line 46) 和 src/table/index.tsx (line 85)]。

2. 函数式列标题被破坏
antd 支持 column.title = props => ReactNode,当前实现无条件把 title 放进 Fragment,导致 antd 无法再识别并执行这个函数,排序/筛选相关的动态标题会异常。见 src/table/index.tsx (line 49)。

3. tooltip 类型没有暴露到默认组件签名
内部实现使用 ITableProps,但最终导出的 RefTable 仍然使用原始 TableProps。TypeScript 下直接内联 tooltip 列配置可能报错。见 src/table/index.tsx (line 24) 和 src/table/index.tsx (line 28)

4. 嵌套表头只处理第一层
convertColumns 没有递归处理 children,分组表头内的列无法使用新增的 tooltip 能力。

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start with src/table/index.tsx at the referenced lines, especially the exported component types, column conversion, and handling of children. Verify the declarative Table.Column form, function-valued titles, inline tooltip typing, and recursive conversion of nested children. Done means all four cases remain compatible with antd and nested columns receive the tooltip capability.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react, typescript
Bereich
frontend
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
75/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.