Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions site/components/table.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ProTable puts a layer of wrapping on top of antd's Table, supports some presets,
/>
```

`request` is also supported in column configuration, but only for a few [valueType](/components/schema#valuetype).
`request` is also supported in column configuration, but only for a few [valueType](/components/schema-form#common-valuetypes).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other links in this document and to correctly format the property name, valueType should be wrapped in backticks.

Suggested change
`request` is also supported in column configuration, but only for a few [valueType](/components/schema-form#common-valuetypes).
`request` is also supported in column configuration, but only for a few [`valueType`](/components/schema-form#common-valuetypes).


### ProTable

Expand Down Expand Up @@ -257,7 +257,7 @@ If you want **client-side** sorting/filtering (and **do not** want to trigger `r
| ellipsis | Whether to abbreviate automatically | `boolean` \| `{showTitle?: boolean}` | - |
| copyable | Whether to support copying | `boolean` | - |
| valueEnum | The value enumeration will automatically convert the value as a key to retrieve the content to be displayed | [valueEnum](/components/schema#valueenum) | - |
| valueType | The type of value, which will generate different renderers | [`valueType`](/components/schema#valuetype) | `text` |
| valueType | The type of value, which will generate different renderers | [`valueType`](/components/schema-form#common-valuetypes) | `text` |
| order | The weight in the query form, the weight is ranked first | `number` | - |
| fieldProps | The props of the query form will be transparently transmitted to the form item. If it is rendered as Input, all props of input are supported. Similarly, if it is select, all props of select are also supported. Also supports method input | `(form,config)=>Record \| Record` | - |
| `formItemProps` | The configuration passed to Form.Item can be configured with rules, but the default query form rules does not take effect. Need to configure `ignoreRules` | `(form,config)=>formItemProps` \| `formItemProps` | - |
Expand All @@ -284,7 +284,7 @@ If you want **client-side** sorting/filtering (and **do not** want to trigger `r

### valueType value type

ProTable encapsulates some commonly used value types to reduce repeated `render` operations. Configure a [`valueType`](/components/schema#valuetype) to display formatted response data.
ProTable encapsulates some commonly used value types to reduce repeated `render` operations. Configure a [`valueType`](/components/schema-form#common-valuetypes) to display formatted response data.

### Batch operation

Expand All @@ -306,7 +306,7 @@ ProTable will generate a Form for filtering list data based on columns, and the

As per the specification, table forms do not require any mandatory parameters, and all clicks on search and reset will trigger a `request` to initiate a query.

Form's columns are generated with different types based on [`valueType`](/components/schema#valuetype).
Form's columns are generated with different types based on [`valueType`](/components/schema-form#common-valuetypes).

> Columns with a valueType of index indexBorder option and no dataIndex and key will be ignored.

Expand Down
8 changes: 4 additions & 4 deletions site/components/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ProTable 在 antd 的 Table 上进行了一层封装,支持了一些预设,
/>
```

列配置中也支持 `request`,但是只有几种 [valueType](/components/schema#valuetype) 支持。
列配置中也支持 `request`,但是只有几种 [valueType](/components/schema-form#常见-valuetype) 支持。
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# 验证 schema-form.md 中 ValueType 相关章节的锚点定义

echo "=== 检查 schema-form.md 中的 ValueType 章节 ==="
rg -n -A2 "^###\s+常见\s+ValueType" site/components/schema-form.md

echo -e "\n=== 检查 schema-form.en-US.md 中的对应章节 ==="
rg -n -A2 "^###\s+Common\s+ValueType" site/components/schema-form.en-US.md

echo -e "\n=== 搜索可能的手动英文锚点定义 ==="
rg -n "\{#[a-zA-Z][\w-:\.]*\}" site/components/schema-form.md site/components/schema-form.en-US.md

Repository: ant-design/pro-components

Length of output: 432


修复 schema-form.md 中的锚点规范违规,并更新对应链接。

验证发现 schema-form.md 中的标题"### 常见 ValueType"(第 81 行)未定义手动英文锚点,自动生成的锚点将以中文字符开头(#常见-valuetype),违反编码规范要求 ^[a-zA-Z][\w-:\.]*$(锚点必须以字母开头)。

需要将该标题修改为:### 常见 ValueType {#common-valuetypes},并更新 site/components/table.md 中对应位置(第 65、259、286、308 行)的所有链接,从 #常见-valuetype 改为 #common-valuetypes。同时检查是否还有其他中文标题存在相同问题。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@site/components/table.md` at line 65, The heading "### 常见 ValueType" in
schema-form.md must be changed to include an explicit English anchor — replace
that heading with "### 常见 ValueType {`#common-valuetypes`}" (refer to the header
text "### 常见 ValueType") and update all links in table.md that point to the old
auto-generated Chinese anchor (currently `#常见-valuetype`) to the new
`#common-valuetypes` (update the occurrences on the lines referencing the table
links, e.g., the links in table.md that currently use `#常见-valuetype`); finally,
scan other markdown headers for Chinese-starting anchors and add manual English
anchors following the same pattern to satisfy the anchor regex.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other links in this document and to correctly format the property name, valueType should be wrapped in backticks.

Suggested change
列配置中也支持 `request`,但是只有几种 [valueType](/components/schema-form#常见-valuetype) 支持。
列配置中也支持 `request`,但是只有几种 [`valueType`](/components/schema-form#常见-valuetype) 支持。


### ProTable

Expand Down Expand Up @@ -256,7 +256,7 @@ ref.current?.cancelEditable(rowKey);
| ellipsis | 是否自动缩略 | boolean \| {showTitle?: boolean,tooltip: [TooltipProps](https://ant-design.antgroup.com/components/tooltip-cn#api)} | - |
| copyable | 是否支持复制 | `boolean` | - |
| valueEnum | 值的枚举,会自动转化把值当成 key 来取出要显示的内容 | [valueEnum](/components/schema#valueenum) | - |
| valueType | 值的类型,会生成不同的渲染器 | [`valueType`](/components/schema#valuetype) | `text` |
| valueType | 值的类型,会生成不同的渲染器 | [`valueType`](/components/schema-form#常见-valuetype) | `text` |
| order | 查询表单中的权重,权重大排序靠前 | `number` | - |
| fieldProps | 查询表单的 props,会透传给表单项,如果渲染出来是 Input,就支持 Input 的所有 props,同理如果是 select,也支持 select 的所有 props。也支持方法传入 | `(form,config)=>Record \| Record` | - |
| `formItemProps` | 传递给 Form.Item 的配置,可以配置 rules,但是默认的查询表单 rules 是不生效的。需要配置 `ignoreRules` | `(form,config)=>formItemProps` \| `formItemProps` | - |
Expand All @@ -283,7 +283,7 @@ ref.current?.cancelEditable(rowKey);

### valueType 值类型

ProTable 封装了一些常用的值类型来减少重复的 `render` 操作,配置一个 [`valueType`](/components/schema#valuetype) 即可展示格式化响应的数据。
ProTable 封装了一些常用的值类型来减少重复的 `render` 操作,配置一个 [`valueType`](/components/schema-form#常见-valuetype) 即可展示格式化响应的数据。

### 批量操作

Expand All @@ -305,7 +305,7 @@ ProTable 会根据列来生成一个 Form,用于筛选列表数据,最后的

按照规范,table 的表单不需要任何的必选参数,所有点击搜索和重置都会触发 `request` 来发起一次查询。

Form 的列是根据 `valueType` 来生成不同的类型,详细的值类型请查看[通用配置](/components/schema#valuetype)。
Form 的列是根据 `valueType` 来生成不同的类型,详细的值类型请查看[通用配置](/components/schema-form#常见-valuetype)。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link text '通用配置' (General Configuration) is a bit vague. It would be clearer to link the valueType term directly, matching the English documentation's style and making the sentence more concise.

Suggested change
Form 的列是根据 `valueType` 来生成不同的类型,详细的值类型请查看[通用配置](/components/schema-form#常见-valuetype)
Form 的列是根据 [`valueType`](/components/schema-form#常见-valuetype) 来生成不同的类型


> valueType 为 index, indexBorder, option 或者没有 dataIndex 和 key 的列将会被忽略。

Expand Down
Loading