From 7f9fdded186753482f0a90bd2fe21e96c82a89bc Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Wed, 1 Jul 2020 22:15:26 +0800 Subject: [PATCH] docs: format api card/carousel/collapse (#25364) --- components/card/index.en-US.md | 30 +++++++++++++++--------------- components/card/index.zh-CN.md | 6 +++--- components/carousel/index.en-US.md | 4 ++-- components/carousel/index.zh-CN.md | 8 ++++---- components/collapse/index.en-US.md | 22 +++++++++++----------- components/collapse/index.zh-CN.md | 22 +++++++++++----------- 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/components/card/index.en-US.md b/components/card/index.en-US.md index 3891e598e9..04bcc5c776 100644 --- a/components/card/index.en-US.md +++ b/components/card/index.en-US.md @@ -22,20 +22,20 @@ A card can be used to display content related to a single subject. The content c | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| actions | The action list, shows at the bottom of the Card. | Array<ReactNode> | - | | +| actions | The action list, shows at the bottom of the Card | Array<ReactNode> | - | | | activeTabKey | Current TabPane's key | string | - | | | headStyle | Inline style to apply to the card head | CSSProperties | - | | | bodyStyle | Inline style to apply to the card content | CSSProperties | - | | | bordered | Toggles rendering of the border around the card | boolean | true | | | cover | Card cover | ReactNode | - | | -| defaultActiveTabKey | Initial active TabPane's key, if `activeTabKey` is not set. | string | - | | -| extra | Content to render in the top-right corner of the card | string\|ReactNode | - | | +| defaultActiveTabKey | Initial active TabPane's key, if `activeTabKey` is not set | string | - | | +| extra | Content to render in the top-right corner of the card | string \| ReactNode | - | | | hoverable | Lift up when hovering card | boolean | false | | | loading | Shows a loading indicator while the contents of the card are being fetched | boolean | false | | -| tabList | List of TabPane's head. | Array<{key: string, tab: ReactNode}> | - | | -| tabBarExtraContent | Extra content in tab bar | React.ReactNode | - | | +| tabList | List of TabPane's head | Array<{key: string, tab: ReactNode}> | - | | +| tabBarExtraContent | Extra content in tab bar | ReactNode | - | | | size | Size of card | `default` \| `small` | `default` | | -| title | Card title | string\|ReactNode | - | | +| title | Card title | string \| ReactNode | - | | | type | Card style type, can be set to `inner` or not set | string | - | | | onTabChange | Callback when tab is switched | (key) => void | - | | | tabProps | [Tabs](/components/tabs/#Tabs) | - | - | | @@ -44,16 +44,16 @@ A card can be used to display content related to a single subject. The content c | Property | Description | Type | Default | Version | | --------- | ------------------------------- | ------------- | ------- | ------- | -| className | className of container | string | - | | +| className | The className of container | string | - | | | hoverable | Lift up when hovering card grid | boolean | true | | -| style | style object of container | CSSProperties | - | | +| style | The style object of container | CSSProperties | - | | ### Card.Meta -| Property | Description | Type | Default | Version | -| ----------- | ------------------------- | ------------- | ------- | ------- | -| avatar | avatar or icon | ReactNode | - | | -| className | className of container | string | - | | -| description | description content | ReactNode | - | | -| style | style object of container | CSSProperties | - | | -| title | title content | ReactNode | - | | +| Property | Description | Type | Default | Version | +| ----------- | ----------------------------- | ------------- | ------- | ------- | +| avatar | Avatar or icon | ReactNode | - | | +| className | The className of container | string | - | | +| description | Description content | ReactNode | - | | +| style | The style object of container | CSSProperties | - | | +| title | Title content | ReactNode | - | | diff --git a/components/card/index.zh-CN.md b/components/card/index.zh-CN.md index 17cf76ea5d..665f8fb8e1 100644 --- a/components/card/index.zh-CN.md +++ b/components/card/index.zh-CN.md @@ -30,13 +30,13 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg | bordered | 是否有边框 | boolean | true | | | cover | 卡片封面 | ReactNode | - | | | defaultActiveTabKey | 初始化选中页签的 key,如果没有设置 activeTabKey | string | `第一个页签` | | -| extra | 卡片右上角的操作区域 | string\|ReactNode | - | | +| extra | 卡片右上角的操作区域 | string \| ReactNode | - | | | hoverable | 鼠标移过时可浮起 | boolean | false | | | loading | 当卡片内容还在加载中时,可以用 loading 展示一个占位 | boolean | false | | | tabList | 页签标题列表 | Array<{key: string, tab: ReactNode}> | - | | -| tabBarExtraContent | tab bar 上额外的元素 | React.ReactNode | - | | +| tabBarExtraContent | tab bar 上额外的元素 | ReactNode | - | | | size | card 的尺寸 | `default` \| `small` | `default` | | -| title | 卡片标题 | string\|ReactNode | - | | +| title | 卡片标题 | string \| ReactNode | - | | | type | 卡片类型,可设置为 `inner` 或 不设置 | string | - | | | onTabChange | 页签切换的回调 | (key) => void | - | | | tabProps | [Tabs](/components/tabs/#Tabs) | - | - | | diff --git a/components/carousel/index.en-US.md b/components/carousel/index.en-US.md index 5c719d506a..876a803b65 100644 --- a/components/carousel/index.en-US.md +++ b/components/carousel/index.en-US.md @@ -20,8 +20,8 @@ A carousel component. Scales with its container. | afterChange | Callback function called after the current index changes | function(current) | - | | | autoplay | Whether to scroll automatically | boolean | false | | | beforeChange | Callback function called before the current index changes | function(from, to) | - | | -| dotPosition | The position of the dots, which can be one of `top` `bottom` `left` `right` | string | bottom | | -| dots | Whether to show the dots at the bottom of the gallery, `object` for `dotsClass` and any others | boolean \| { className?:string } | true | | +| dotPosition | The position of the dots, which can be one of `top` `bottom` `left` `right` | string | `bottom` | | +| dots | Whether to show the dots at the bottom of the gallery, `object` for `dotsClass` and any others | boolean \| { className?: string } | true | | | easing | Transition interpolation function name | string | `linear` | | | effect | Transition effect | `scrollx` \| `fade` | `scrollx` | | diff --git a/components/carousel/index.zh-CN.md b/components/carousel/index.zh-CN.md index 4b4bc57a46..f30bd7db2c 100644 --- a/components/carousel/index.zh-CN.md +++ b/components/carousel/index.zh-CN.md @@ -21,10 +21,10 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/%24C9tmj978R/Carousel.svg | afterChange | 切换面板的回调 | function(current) | - | | | | autoplay | 是否自动切换 | boolean | false | | | | beforeChange | 切换面板的回调 | function(from, to) | - | | | -| dotPosition | 面板指示点位置,可选 `top` `bottom` `left` `right` | string | bottom | | -| dots | 是否显示面板指示点,如果为 `object` 则同时可以指定 `dotsClass` 或者 | boolean \| { className?:string } | true | | | -| easing | 动画效果 | string | linear | | | -| effect | 动画效果函数,可取 scrollx, fade | string | scrollx | | | +| dotPosition | 面板指示点位置,可选 `top` `bottom` `left` `right` | string | `bottom` | | +| dots | 是否显示面板指示点,如果为 `object` 则同时可以指定 `dotsClass` 或者 | boolean \| { className?: string } | true | | | +| easing | 动画效果 | string | `linear` | | | +| effect | 动画效果函数 | `scrollx` \| `fade` | `scrollx` | | | ## 方法 diff --git a/components/collapse/index.en-US.md b/components/collapse/index.en-US.md index b107018b2e..18cf5c5f74 100644 --- a/components/collapse/index.en-US.md +++ b/components/collapse/index.en-US.md @@ -19,23 +19,23 @@ A content area which can be collapsed and expanded. | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| activeKey | Key of the active panel | string\[]\|string\| number\[]\|number | No default value. In `accordion` mode, it's the key of the first panel. | | -| defaultActiveKey | Key of the initial active panel | string\[]\|string\| number\[]\|number | - | | +| activeKey | Key of the active panel | string\[] \| string
number\[] \| number | No default value. In `accordion` mode, it's the key of the first panel | | +| defaultActiveKey | Key of the initial active panel | string\[] \| string
number\[] \| number | - | | | bordered | Toggles rendering of the border around the collapse block | boolean | true | | -| accordion | If `true`, `Collapse` renders as `Accordion` | boolean | false | | -| onChange | Callback function executed when active panel is changed | Function | - | | -| expandIcon | allow to customize collapse icon | (panelProps) => ReactNode | - | | +| accordion | If true, Collapse renders as Accordion | boolean | false | | +| onChange | Callback function executed when active panel is changed | function | - | | +| expandIcon | Allow to customize collapse icon | (panelProps) => ReactNode | - | | | expandIconPosition | Set expand icon position | `left` \| `right` | - | | | destroyInactivePanel | Destroy Inactive Panel | boolean | false | | -| ghost | make the collapse borderless and its background transparent | boolean | false | 4.4.0 | +| ghost | Make the collapse borderless and its background transparent | boolean | false | 4.4.0 | ### Collapse.Panel | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | -| disabled | If `true`, panel cannot be opened or closed | boolean | false | | +| disabled | If true, panel cannot be opened or closed | boolean | false | | | forceRender | Forced render of content on panel, instead of lazy rending after clicking on header | boolean | false | | -| header | Title of the panel | string\|ReactNode | - | | -| key | Unique key identifying the panel from among its siblings | string\|number | - | | -| showArrow | If `false`, panel will not show arrow icon | boolean | true | | -| extra | extra element in the corner | ReactNode | - | | +| header | Title of the panel | string \| ReactNode | - | | +| key | Unique key identifying the panel from among its siblings | string \| number | - | | +| showArrow | If false, panel will not show arrow icon | boolean | true | | +| extra | The extra element in the corner | ReactNode | - | | diff --git a/components/collapse/index.zh-CN.md b/components/collapse/index.zh-CN.md index 65f9f20253..172bebbe02 100644 --- a/components/collapse/index.zh-CN.md +++ b/components/collapse/index.zh-CN.md @@ -20,11 +20,11 @@ cover: https://gw.alipayobjects.com/zos/alicdn/IxH16B9RD/Collapse.svg | 参数 | 说明 | 类型 | 默认值 | 版本 | | --- | --- | --- | --- | --- | -| activeKey | 当前激活 tab 面板的 key | string\[]\|string\| number\[]\|number | 默认无,accordion 模式下默认第一个元素 | | -| defaultActiveKey | 初始化选中面板的 key | string\[]\|string\| number\[]\|number | - | | +| activeKey | 当前激活 tab 面板的 key | string\[] \| string
number\[] \| number | 默认无,accordion 模式下默认第一个元素 | | +| defaultActiveKey | 初始化选中面板的 key | string\[] \| string
number\[] \| number | - | | | bordered | 带边框风格的折叠面板 | boolean | true | | | accordion | 手风琴模式 | boolean | false | | -| onChange | 切换面板的回调 | Function | - | | +| onChange | 切换面板的回调 | function | - | | | expandIcon | 自定义切换图标 | (panelProps) => ReactNode | - | | | expandIconPosition | 设置图标位置 | `left` \| `right` | - | | | destroyInactivePanel | 销毁折叠隐藏的面板 | boolean | false | | @@ -32,11 +32,11 @@ cover: https://gw.alipayobjects.com/zos/alicdn/IxH16B9RD/Collapse.svg ### Collapse.Panel -| 参数 | 说明 | 类型 | 默认值 | 版本 | -| ----------- | ------------------------------------------ | ----------------- | ------ | ---- | -| disabled | 禁用后的面板展开与否将无法通过用户交互改变 | boolean | false | | -| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | | -| header | 面板头内容 | string\|ReactNode | - | | -| key | 对应 activeKey | string\|number | - | | -| showArrow | 是否展示当前面板上的箭头 | boolean | true | | -| extra | 自定义渲染每个面板右上角的内容 | ReactNode | - | | +| 参数 | 说明 | 类型 | 默认值 | 版本 | +| ----------- | ------------------------------------------ | ------------------- | ------ | ---- | +| disabled | 禁用后的面板展开与否将无法通过用户交互改变 | boolean | false | | +| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | | +| header | 面板头内容 | string \| ReactNode | - | | +| key | 对应 activeKey | string \| number | - | | +| showArrow | 是否展示当前面板上的箭头 | boolean | true | | +| extra | 自定义渲染每个面板右上角的内容 | ReactNode | - | |