瀏覽代碼

docs: update table fixed column doc

shijia.me 2 年之前
父節點
當前提交
170da96314
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 1 1
      content/show/table/index-en-US.md
  2. 4 2
      content/show/table/index.md

+ 1 - 1
content/show/table/index-en-US.md

@@ -810,9 +810,9 @@ render(App);
 
 
 You can fix the column by setting the Fixed attribute of the column and scroll.x, and fix the header by setting scroll.y.
 You can fix the column by setting the Fixed attribute of the column and scroll.x, and fix the header by setting scroll.y.
 
 
+> -   It is recommended to specify scroll.x as a **fixed value** or percentage greater than the width of the table. If it is a fixed value, set it to >= the sum of all fixed column widths + the sum of all table column widths.
 > -   Make sure that all elements inside the table do not affect the height of the cells after rendering (e.g. containing unloaded pictures, etc.). In this case, give the stator element a definite height to ensure that the left and right Fixed columns of cells are not deranged.
 > -   Make sure that all elements inside the table do not affect the height of the cells after rendering (e.g. containing unloaded pictures, etc.). In this case, give the stator element a definite height to ensure that the left and right Fixed columns of cells are not deranged.
 > -   If the column header is not aligned with the content or there is a column duplication or when the fixed column fails, specify the width width of the fixed column, if still not effective, try to recommend leaving a column with no width to accommodate the elastic layout, or check for ultra-long continuous fields to destroy the layout.
 > -   If the column header is not aligned with the content or there is a column duplication or when the fixed column fails, specify the width width of the fixed column, if still not effective, try to recommend leaving a column with no width to accommodate the elastic layout, or check for ultra-long continuous fields to destroy the layout.
-> -   It is recommended to specify scroll.x as a **fixed value** or percentage greater than the width of the table. It is recommended to set a fixed value of `>= the sum of all fixed column widths + the sum of all table column widths`.
 
 
 ```jsx live=true noInline=true dir="column"
 ```jsx live=true noInline=true dir="column"
 import React, { useState, useMemo } from 'react';
 import React, { useState, useMemo } from 'react';

+ 4 - 2
content/show/table/index.md

@@ -807,9 +807,11 @@ render(App);
 
 
 可以通过设置 column 的 `fixed` 属性以及 `scroll.x` 来进行列固定,通过设置 `scroll.y` 来进行表头固定。
 可以通过设置 column 的 `fixed` 属性以及 `scroll.x` 来进行列固定,通过设置 `scroll.y` 来进行表头固定。
 
 
-> -   请确保表格内部的所有元素在渲染后不会对单元格的高度造成影响(例如含有未加载完成的图片等),这种情况下请给定子元素一个确定的高度,以此确保左右固定列单元格不会错乱。
+如果是固定值,设置为 >=所有固定列宽之和+所有表格列宽之和 的数值。
+
+> -   建议指定 `scroll.x` 为大于表格宽度的**固定值**或百分比。 如果是固定值,设置为 `>=所有固定列宽之和+所有表格列宽之和` 的数值。
 > -   若列头与内容不对齐或出现列重复或者固定列失效的情况,请指定固定列的宽度 `width`,若指定宽度后仍不生效,请尝试建议留一列不设宽度以适应弹性布局,或者检查是否有超长连续字段破坏布局。
 > -   若列头与内容不对齐或出现列重复或者固定列失效的情况,请指定固定列的宽度 `width`,若指定宽度后仍不生效,请尝试建议留一列不设宽度以适应弹性布局,或者检查是否有超长连续字段破坏布局。
-> -   建议指定 `scroll.x` 为大于表格宽度的**固定值**或百分比。推荐设置为 `>=所有固定列宽之和+所有表格列宽之和` 的固定数值。
+> -   请确保表格内部的所有元素在渲染后不会对单元格的高度造成影响(例如含有未加载完成的图片等),这种情况下请给定子元素一个确定的高度,以此确保左右固定列单元格不会错乱
 
 
 ```jsx live=true noInline=true dir="column"
 ```jsx live=true noInline=true dir="column"
 import React, { useState, useMemo } from 'react';
 import React, { useState, useMemo } from 'react';