mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
docs(data-table): update key related docs (#874)
* docs(NDataTable): update n-data-table docs * docs: optimization
This commit is contained in:
parent
42af26485f
commit
4c66026855
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user