ant-design / ant-design/pro-components

👑 [需求] ProTable/ProForm columns 可以区分 table 和 form 吗?

Open
#9,061 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🔩 所属模块或组件

ProTable/ProForm/BetaSchemaForm

### 🥰 需求描述

同一个 columns 用于 ProTable 和 ProForm,width 可以区分 Table 和 Form 吗?

写了一个 width 在 Table 下用于 cell width;但是在 Form 下也用来设置 input width 了,导致 input 样式不对。

Table 和 Form 的 width 可以区分吗?

### ⛰ 功能需求适用场景

### 🧐 解决方案

增加 tableWidth/formWidth,或者 width 支持函数 `(type: 'form' | 'table') => number | string`

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start by locating the ProTable, ProForm, and BetaSchemaForm column-handling entry points; the issue names no files or tests. Trace how the shared width value is used in table and form contexts, then compare the proposed tableWidth/formWidth and context-function designs. Done means the same columns can specify independent table and form widths.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.