mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
docs: format api list/popover/statistic (#25368)
This commit is contained in:
parent
2ad8fec45d
commit
1f1c376b47
@ -19,27 +19,27 @@ A list can be used to display content related to a single subject. The content c
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| bordered | Toggles rendering of the border around the list | boolean | false | |
|
||||
| footer | List footer renderer | string\|ReactNode | - | |
|
||||
| footer | List footer renderer | string \| ReactNode | - | |
|
||||
| grid | The grid type of list. You can set grid to something like {gutter: 16, column: 4} | [object](#List-grid-props) | - | |
|
||||
| header | List header renderer | string\|ReactNode | - | |
|
||||
| header | List header renderer | string \| ReactNode | - | |
|
||||
| itemLayout | The layout of list, default is `horizontal`, If a vertical list is desired, set the itemLayout property to `vertical` | string | - | |
|
||||
| rowKey | Item's unique key, could be a string or function that returns a string | string\|Function(record):string | `key` | |
|
||||
| loading | Shows a loading indicator while the contents of the list are being fetched | boolean\|[SpinProps](/components/spin/#API) ([more](https://github.com/ant-design/ant-design/issues/8659)) | false | |
|
||||
| loadMore | Shows a load more content | string\|ReactNode | - | |
|
||||
| locale | i18n text including empty text | object | emptyText: 'No Data' <br> | |
|
||||
| rowKey | Item's unique key, could be a string or function that returns a string | string \| Function(record): string | `key` | |
|
||||
| loading | Shows a loading indicator while the contents of the list are being fetched | boolean \| [SpinProps](/components/spin/#API) ([more](https://github.com/ant-design/ant-design/issues/8659)) | false | |
|
||||
| loadMore | Shows a load more content | string \| ReactNode | - | |
|
||||
| locale | The i18n text including empty text | object | {emptyText: `No Data`} | |
|
||||
| pagination | Pagination [config](/components/pagination/), hide it by setting it to false | boolean \| object | false | |
|
||||
| size | Size of list | `default` \| `large` \| `small` | `default` | |
|
||||
| split | Toggles rendering of the split under the list item | boolean | true | |
|
||||
| dataSource | dataSource array for list | any[] | - | |
|
||||
| renderItem | customize list item when using `dataSource` | `item => ReactNode` | - | |
|
||||
| dataSource | DataSource array for list | any[] | - | |
|
||||
| renderItem | Customize list item when using `dataSource` | (item) => ReactNode | - | |
|
||||
|
||||
### pagination
|
||||
|
||||
Properties for pagination.
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ------------------------------------ | --------------------------- | -------- |
|
||||
| position | specify the position of `Pagination` | `top` \| `bottom` \| `both` | `bottom` |
|
||||
| Property | Description | Type | Default |
|
||||
| -------- | ---------------------------------------- | --------------------------- | -------- |
|
||||
| position | The specify the position of `Pagination` | `top` \| `bottom` \| `both` | `bottom` |
|
||||
|
||||
More about pagination, please check [`Pagination`](/components/pagination/).
|
||||
|
||||
@ -47,8 +47,8 @@ More about pagination, please check [`Pagination`](/components/pagination/).
|
||||
|
||||
| Property | Description | Type | Default | Version |
|
||||
| -------- | ------------------------ | ------ | ------- | ------- |
|
||||
| column | column of grid | number | - | |
|
||||
| gutter | spacing between grid | number | 0 | |
|
||||
| column | The column of grid | number | - | |
|
||||
| gutter | The spacing between grid | number | 0 | |
|
||||
| xs | `<576px` column of grid | number | - | |
|
||||
| sm | `≥576px` column of grid | number | - | |
|
||||
| md | `≥768px` column of grid | number | - | |
|
||||
@ -60,13 +60,13 @@ More about pagination, please check [`Pagination`](/components/pagination/).
|
||||
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| actions | The actions content of list item. If `itemLayout` is `vertical`, shows the content on bottom, otherwise shows content on the far right. | Array<ReactNode> | - | |
|
||||
| extra | The extra content of list item. If `itemLayout` is `vertical`, shows the content on right, otherwise shows content on the far right. | string\|ReactNode | - | |
|
||||
| actions | The actions content of list item. If `itemLayout` is `vertical`, shows the content on bottom, otherwise shows content on the far right | Array<ReactNode> | - | |
|
||||
| extra | The extra content of list item. If `itemLayout` is `vertical`, shows the content on right, otherwise shows content on the far right | string \| ReactNode | - | |
|
||||
|
||||
### List.Item.Meta
|
||||
|
||||
| Property | Description | Type | Default | Version |
|
||||
| ----------- | ---------------------------- | ----------------- | ------- | ------- |
|
||||
| avatar | The avatar of list item | ReactNode | - | |
|
||||
| description | The description of list item | string\|ReactNode | - | |
|
||||
| title | The title of list item | string\|ReactNode | - | |
|
||||
| Property | Description | Type | Default | Version |
|
||||
| ----------- | ---------------------------- | ------------------- | ------- | ------- |
|
||||
| avatar | The avatar of list item | ReactNode | - | |
|
||||
| description | The description of list item | string \| ReactNode | - | |
|
||||
| title | The title of list item | string \| ReactNode | - | |
|
||||
|
@ -20,18 +20,18 @@ cover: https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| bordered | 是否展示边框 | boolean | false | |
|
||||
| footer | 列表底部 | string\|ReactNode | - | |
|
||||
| footer | 列表底部 | string \| ReactNode | - | |
|
||||
| grid | 列表栅格配置 | [object](#List-grid-props) | - | |
|
||||
| header | 列表头部 | string\|ReactNode | - | |
|
||||
| header | 列表头部 | string \| ReactNode | - | |
|
||||
| itemLayout | 设置 `List.Item` 布局, 设置成 `vertical` 则竖直样式显示, 默认横排 | string | - | |
|
||||
| loading | 当卡片内容还在加载中时,可以用 `loading` 展示一个占位 | boolean\|[object](/components/spin/#API) ([更多](https://github.com/ant-design/ant-design/issues/8659)) | false | |
|
||||
| loadMore | 加载更多 | string\|ReactNode | - | |
|
||||
| locale | 默认文案设置,目前包括空数据文案 | object | emptyText: '暂无数据' | |
|
||||
| pagination | 对应的 `pagination` 配置, 设置 `false` 不显示 | boolean\|object | false | |
|
||||
| loading | 当卡片内容还在加载中时,可以用 `loading` 展示一个占位 | boolean \| [object](/components/spin/#API) ([更多](https://github.com/ant-design/ant-design/issues/8659)) | false | |
|
||||
| loadMore | 加载更多 | string \| ReactNode | - | |
|
||||
| locale | 默认文案设置,目前包括空数据文案 | object | {emptyText: `暂无数据`} | |
|
||||
| pagination | 对应的 `pagination` 配置, 设置 false 不显示 | boolean \| object | false | |
|
||||
| size | list 的尺寸 | `default` \| `large` \| `small` | `default` | |
|
||||
| split | 是否展示分割线 | boolean | true | |
|
||||
| dataSource | 列表数据源 | any[] | - | |
|
||||
| renderItem | 当使用 dataSource 时,可以用 `renderItem` 自定义渲染列表项 | `item => ReactNode` | - | |
|
||||
| renderItem | 当使用 dataSource 时,可以用 `renderItem` 自定义渲染列表项 | (item) => ReactNode | - | |
|
||||
|
||||
### pagination
|
||||
|
||||
@ -61,12 +61,12 @@ cover: https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| actions | 列表操作组,根据 `itemLayout` 的不同, 位置在卡片底部或者最右侧 | Array<ReactNode> | - | |
|
||||
| extra | 额外内容, 通常用在 `itemLayout` 为 `vertical` 的情况下, 展示右侧内容; `horizontal` 展示在列表元素最右侧 | string\|ReactNode | - | |
|
||||
| extra | 额外内容, 通常用在 `itemLayout` 为 `vertical` 的情况下, 展示右侧内容; `horizontal` 展示在列表元素最右侧 | string \| ReactNode | - | |
|
||||
|
||||
### List.Item.Meta
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ----------- | ------------------ | ----------------- | ------ | ---- |
|
||||
| avatar | 列表元素的图标 | ReactNode | - | |
|
||||
| description | 列表元素的描述内容 | string\|ReactNode | - | |
|
||||
| title | 列表元素的标题 | string\|ReactNode | - | |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ----------- | ------------------ | ------------------- | ------ | ---- |
|
||||
| avatar | 列表元素的图标 | ReactNode | - | |
|
||||
| description | 列表元素的描述内容 | string \| ReactNode | - | |
|
||||
| title | 列表元素的标题 | string \| ReactNode | - | |
|
||||
|
@ -15,10 +15,10 @@ Comparing with `Tooltip`, besides information `Popover` card can also provide ac
|
||||
|
||||
## API
|
||||
|
||||
| Param | Description | Type | Default value | Version |
|
||||
| ------- | ------------------- | ---------------------------------- | ------------- | ------- |
|
||||
| content | Content of the card | string\|ReactNode\|() => ReactNode | - | |
|
||||
| title | Title of the card | string\|ReactNode\|() => ReactNode | - | |
|
||||
| Param | Description | Type | Default value | Version |
|
||||
| ------- | ------------------- | -------------------------------------- | ------------- | ------- |
|
||||
| content | Content of the card | string \| ReactNode \| () => ReactNode | - | |
|
||||
| title | Title of the card | string \| ReactNode \| () => ReactNode | - | |
|
||||
|
||||
Consult [Tooltip's documentation](/components/tooltip/#API) to find more APIs.
|
||||
|
||||
|
@ -16,10 +16,10 @@ cover: https://gw.alipayobjects.com/zos/alicdn/1PNL1p_cO/Popover.svg
|
||||
|
||||
## API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ------- | -------- | ---------------------------------- | ------ | ---- |
|
||||
| content | 卡片内容 | string\|ReactNode\|() => ReactNode | - | |
|
||||
| title | 卡片标题 | string\|ReactNode\|() => ReactNode | - | |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ------- | -------- | -------------------------------------- | ------ | ---- |
|
||||
| content | 卡片内容 | string \| ReactNode \| () => ReactNode | - | |
|
||||
| title | 卡片标题 | string \| ReactNode \| () => ReactNode | - | |
|
||||
|
||||
更多属性请参考 [Tooltip](/components/tooltip/#API)。
|
||||
|
||||
|
@ -18,12 +18,12 @@ Display statistic number.
|
||||
|
||||
| Property | Description | Type | Default | Version |
|
||||
| ---------------- | ----------------------------- | -------------------- | ------- | ------- |
|
||||
| decimalSeparator | decimal separator | string | . | |
|
||||
| formatter | customize value display logic | (value) => ReactNode | - | |
|
||||
| groupSeparator | group separator | string | `,` | |
|
||||
| precision | precision of input value | number | - | |
|
||||
| prefix | prefix node of value | string \| ReactNode | - | |
|
||||
| suffix | suffix node of value | string \| ReactNode | - | |
|
||||
| decimalSeparator | The decimal separator | string | `.` | |
|
||||
| formatter | Customize value display logic | (value) => ReactNode | - | |
|
||||
| groupSeparator | Group separator | string | `,` | |
|
||||
| precision | The precision of input value | number | - | |
|
||||
| prefix | The prefix node of value | string \| ReactNode | - | |
|
||||
| suffix | The suffix node of value | string \| ReactNode | - | |
|
||||
| title | Display title | string \| ReactNode | - | |
|
||||
| value | Display value | string \| number | - | |
|
||||
| valueStyle | Set value css style | CSSProperties | - | |
|
||||
@ -34,8 +34,8 @@ Display statistic number.
|
||||
| --- | --- | --- | --- | --- |
|
||||
| format | Format as [moment](http://momentjs.com/) | string | `HH:mm:ss` | |
|
||||
| onFinish | Trigger when time's up | () => void | - | |
|
||||
| prefix | prefix node of value | string \| ReactNode | - | |
|
||||
| suffix | suffix node of value | string \| ReactNode | - | |
|
||||
| prefix | The prefix node of value | string \| ReactNode | - | |
|
||||
| suffix | The suffix node of value | string \| ReactNode | - | |
|
||||
| title | Display title | string \| ReactNode | - | |
|
||||
| value | Set target countdown time | number \| moment | - | |
|
||||
| valueStyle | Set value css style | CSSProperties | - | |
|
||||
|
@ -19,7 +19,7 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/rcBNhLBrKbE/Statistic.svg
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ---------------- | ---------------- | -------------------- | ------ | ---- |
|
||||
| decimalSeparator | 设置小数点 | string | . | |
|
||||
| decimalSeparator | 设置小数点 | string | `.` | |
|
||||
| formatter | 自定义数值展示 | (value) => ReactNode | - | |
|
||||
| groupSeparator | 设置千分位标识符 | string | `,` | |
|
||||
| precision | 数值精度 | number | - | |
|
||||
|
Loading…
Reference in New Issue
Block a user