From 8194793f9ba87252522fac050dc3dd89ab8c3fac Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 18 Feb 2017 16:49:34 +0800 Subject: [PATCH] Update demo documentation --- components/table/demo/fixed-columns-header.md | 10 +++++++--- components/table/demo/fixed-columns.md | 14 +++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/components/table/demo/fixed-columns-header.md b/components/table/demo/fixed-columns-header.md index 3d99ef7244..4306d732dc 100644 --- a/components/table/demo/fixed-columns-header.md +++ b/components/table/demo/fixed-columns-header.md @@ -9,18 +9,22 @@ title: 适合同时展示有大量数据和数据列。 -> 若列头与内容不对齐,请指定每列宽度 `width`。 +> 若列头与内容不对齐,请指定列的宽度 `width`。 > 建议指定 `scroll.x` 为固定宽度。注意,非固定列宽度之和不要超过 `scroll.x`。 +> 如果希望 `scroll.x` 为自适应内容宽度,可以指定 `scroll={{ x: true }}`,然后使用 `white-space: nowrap` 样式强制单元格不自动换行。 + ## en-US -Suitable for large amounts of data with long columns. +A Solution for displaying large amounts of data with long columns. -> Specify the width of each column if header and cell do not align properly. +> Specify the width of columns if header and cell do not align properly. > A fixed width for `scroll.x` is recommended. The sum of unfixed columns should not greater than `scroll.x`. +> If you hope the `scroll.x` will adapt content's witdh, you can set `scroll={{ x: true }}` ant then use css `white-space: nowrap` to make sure table cell will not be wrapped. + ````jsx import { Table } from 'antd'; diff --git a/components/table/demo/fixed-columns.md b/components/table/demo/fixed-columns.md index 1f8b3ed854..4e4a60e10c 100644 --- a/components/table/demo/fixed-columns.md +++ b/components/table/demo/fixed-columns.md @@ -9,17 +9,21 @@ title: 对于列数很多的数据,可以固定前后的列,横向滚动查看其它数据,需要和 `scroll.x` 配合使用。 -> 若列头与内容不对齐,请指定每列宽度 `width`。 +> 若列头与内容不对齐,请指定列的宽度 `width`。 -> 建议指定 scroll.x 为固定宽度。 +> 建议指定 `scroll.x` 为固定宽度。注意,非固定列宽度之和不要超过 `scroll.x`。 + +> 如果希望 `scroll.x` 为自适应内容宽度,可以指定 `scroll={{ x: true }}`,然后使用 `white-space: nowrap` 样式强制单元格不自动换行。 ## en-US -Fix some columns and scroll in other columns. You must set `scoll.x` meanwhile. +To fix some columns and scroll inside other columns, and you must set `scoll.x` meanwhile. -> Specify the width of each column if header and cell do not align properly. +> Specify the width of columns if header and cell do not align properly. -> A fixed width for `scroll.x` is recommended. +> A fixed width for `scroll.x` is recommended. The sum of unfixed columns should not greater than `scroll.x`. + +> If you hope the `scroll.x` will adapt content's witdh, you can set `scroll={{ x: true }}` ant then use css `white-space: nowrap` to make sure table cell will not be wrapped. ````jsx import { Table } from 'antd';