DTStack / DTStack/dt-react-component
[Feature Request]: Table 组件目前不是全部兼容 antd
- Lingua principale
- TypeScript
- Stelle
- 106
- Fork
- 42
- Merge medio
- 2g 6h
- PR unite (30g)
- 1
Descrizione
### 功能
增强现有功能
### 详细描述
#### 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 能力。
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react, typescript
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 75/100