docs(data-table): update key related docs (#874)

* docs(NDataTable): update n-data-table docs

* docs: optimization
This commit is contained in:
XieZongChen 2021-08-15 12:45:50 -05:00 committed by GitHub
parent 42af26485f
commit 4c66026855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ DataTable is used to displays rows of structured data.
## Demos
<n-alert type="warning" title="Caveat" style="margin-bottom: 16px;">
Every row data needs a unique key property, otherwise you should specify <n-text code>row-key</n-text>
Each item of the array passing in the <n-text code>data</n-text> attribute represents a row of rendered data, and each row of data must have a unique key, otherwise the <n-text code>row key</n-text> attribute must be declared on the table; The <n-text code>key</n-text> attribute of <n-a href="#DataTableColumn-Properties">DataTableColumn</n-a> is used to ensure the uniqueness of data in each column. Both can ensure the accuracy of data rendering and interaction.
</n-alert>
```demo

View File

@ -7,7 +7,7 @@
## 演示
<n-alert type="warning" title="注意" style="margin-bottom: 16px;">
每一行数据都要有唯一的 key否则要在 table 上声明 <n-text code>row-key</n-text> 属性
传入 <n-text code>data</n-text> 属性的数组的每一项都代表渲染的一行数据,每一行数据都要有唯一的 key否则要在 table 上声明 <n-text code>row-key</n-text> 属性<n-a href="#DataTableColumn-Properties">DataTableColumn</n-a><n-text code>key</n-text> 属性用于保证每一列数据的唯一性。两者均能确保数据渲染及交互时的准确
</n-alert>
```demo