From e95eb61bcb9dddcfab9cfa656d473c3c8c361b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=E5=B0=8F=E5=88=98?= <1016817543@qq.com> Date: Sat, 10 Apr 2021 21:22:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(tbale):=20=E5=88=86=E7=BB=84=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E6=94=AF=E6=8C=81=E5=9B=BA=E5=AE=9A-1.x=20(#3896)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(table): 分组表头支持固定 * docs(table): 增加分组表头固定的英文文档 --- antdv-demo/docs/table/index.en-US.md | 1 + antdv-demo/docs/table/index.zh-CN.md | 1 + components/table/ColumnGroup.jsx | 1 + 3 files changed, 3 insertions(+) diff --git a/antdv-demo/docs/table/index.en-US.md b/antdv-demo/docs/table/index.en-US.md index 3c83ba883..effc65e2d 100644 --- a/antdv-demo/docs/table/index.en-US.md +++ b/antdv-demo/docs/table/index.en-US.md @@ -111,6 +111,7 @@ One of the Table `columns` prop for describing the table's columns, Column has t | Property | Description | Type | Default | | --- | --- | --- | --- | | title | Title of the column group | string\|slot | - | +| fixed | Set column group to be fixed: `true`(same as left) `'left'` `'right'` | boolean\|string | `false` | | | slots | When using columns, you can use this property to configure the properties that support the slot, such as `slots: { title: 'XXX'}` | object | - | ### pagination diff --git a/antdv-demo/docs/table/index.zh-CN.md b/antdv-demo/docs/table/index.zh-CN.md index d13707e58..33bd7e11c 100644 --- a/antdv-demo/docs/table/index.zh-CN.md +++ b/antdv-demo/docs/table/index.zh-CN.md @@ -111,6 +111,7 @@ | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | title | 列头显示文字 | string\|slot | - | +| fixed | 列是否固定,可选 `true`(等效于 left) `'left'` `'right'` | boolean\|string | false | | | slots | 使用 columns 时,可以通过该属性配置支持 slot 的属性,如 `slots: { title: 'XXX'}` | object | - | ### pagination diff --git a/components/table/ColumnGroup.jsx b/components/table/ColumnGroup.jsx index e5d25b396..ca18e5490 100644 --- a/components/table/ColumnGroup.jsx +++ b/components/table/ColumnGroup.jsx @@ -3,6 +3,7 @@ import PropTypes from '../_util/vue-types'; export default { name: 'ATableColumnGroup', props: { + fixed: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['left', 'right'])]), title: PropTypes.any, }, __ANT_TABLE_COLUMN_GROUP: true,