mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
docs(grid): API table (#635)
* docs(grid): 完善栅格组件的说明文档 * Apply suggestions from code review Co-authored-by: 07akioni <07akioni2@gmail.com>
This commit is contained in:
parent
702c93cd5f
commit
e99e8a1c35
@ -18,31 +18,31 @@ collapse
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| cols | `number \| ResponsiveDescription` | `24` | |
|
||||
| collapsed | `boolean` | `false` | |
|
||||
| collapsed-rows | `number` | `1` | |
|
||||
| cols | `number \| ResponsiveDescription` | `24` | Number of grids displayed. |
|
||||
| collapsed | `boolean` | `false` | Whether to fold by default. |
|
||||
| collapsed-rows | `number` | `1` | The number of rows displayed by default. |
|
||||
| responsive | `'self' \| 'screen'` | `'screen'` | `'self'` triggers responsive layout by its own width. `'screen'` triggers responsive layout by viewport's witdh. |
|
||||
| x-gap | `number \| ResponsiveDescription` | `0` | |
|
||||
| y-gap | `number \| ResponsiveDescription` | `0` | |
|
||||
| x-gap | `number \| ResponsiveDescription` | `0` | Horizontal gap. |
|
||||
| y-gap | `number \| ResponsiveDescription` | `0` | Vertical gap. |
|
||||
|
||||
### GridItem Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ------ | --------- | ------- | ----------- |
|
||||
| offset | `number` | `0` | |
|
||||
| span | `number` | `1` | |
|
||||
| suffix | `boolean` | `false` | |
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| offset | `number` | `0` | The number of intervals to the left of the grid. |
|
||||
| span | `number` | `1` | The number of columns occupied by the grid. |
|
||||
| suffix | `boolean` | `false` | Grid suffix. |
|
||||
|
||||
## Slots
|
||||
|
||||
### Grid Slots
|
||||
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ---------- | ----------- |
|
||||
| default | `()` | |
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ---------- | ------------- |
|
||||
| default | `()` | Grid content. |
|
||||
|
||||
### GridItem Slots
|
||||
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ------------------------- | ----------- |
|
||||
| default | `({ overflow: boolean })` | |
|
||||
| Name | Parameters | Description |
|
||||
| ------- | ------------------------- | ------------------ |
|
||||
| default | `({ overflow: boolean })` | Grid item content. |
|
||||
|
@ -19,31 +19,31 @@ grid-basic-debug
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| --- | --- | --- | --- |
|
||||
| cols | `number \| ResponsiveDescription` | `24` | |
|
||||
| collapsed | `boolean` | `false` | |
|
||||
| collapsed-rows | `number` | `1` | |
|
||||
| cols | `number \| ResponsiveDescription` | `24` | 显示的栅格数量 |
|
||||
| collapsed | `boolean` | `false` | 是否默认折叠 |
|
||||
| collapsed-rows | `number` | `1` | 默认展示的行数 |
|
||||
| responsive | `'self' \| 'screen'` | `'self'` | `'self'` 根据自身宽度进行响应式布局,`'screen'` 根据屏幕断点进行响应式布局 |
|
||||
| x-gap | `number \| ResponsiveDescription` | `0` | |
|
||||
| y-gap | `number \| ResponsiveDescription` | `0` | |
|
||||
| x-gap | `number \| ResponsiveDescription` | `0` | 横向间隔槽 |
|
||||
| y-gap | `number \| ResponsiveDescription` | `0` | 纵向间隔槽 |
|
||||
|
||||
### GridItem Props
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| ------ | --------- | ------- | ---- |
|
||||
| offset | `number` | `0` | |
|
||||
| span | `number` | `1` | |
|
||||
| suffix | `boolean` | `false` | |
|
||||
| 名称 | 类型 | 默认值 | 说明 |
|
||||
| ------ | --------- | ------- | ------------------ |
|
||||
| offset | `number` | `0` | 栅格左侧的间隔格数 |
|
||||
| span | `number` | `1` | 栅格占据的列数 |
|
||||
| suffix | `boolean` | `false` | 栅格后缀 |
|
||||
|
||||
## Slots
|
||||
|
||||
### Grid Slots
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ---- | ---- |
|
||||
| default | `()` | |
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ---- | -------- |
|
||||
| default | `()` | 栅格内容 |
|
||||
|
||||
### GridItem Slots
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ------------------------- | ---- |
|
||||
| default | `({ overflow: boolean })` | |
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ------------------------- | ------------ |
|
||||
| default | `({ overflow: boolean })` | 栅格节点内容 |
|
||||
|
Loading…
Reference in New Issue
Block a user