mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
docs: fix component demo column number (#38631)
* docs: fix component demo column number * test: skip test case
This commit is contained in:
parent
e027cbec1c
commit
ac143ffb4d
@ -5,8 +5,8 @@ cover: https://gw.alipayobjects.com/zos/alicdn/tX6-md4H6/Affix.svg
|
||||
demo:
|
||||
cols: 2
|
||||
group:
|
||||
title: Other
|
||||
order:
|
||||
title: 其他
|
||||
order: 7
|
||||
---
|
||||
|
||||
Wrap Affix around another component to make it stick the viewport.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
category: Components
|
||||
subtitle: 固钉
|
||||
title: Affix
|
||||
subtitle: 固钉
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/tX6-md4H6/Affix.svg
|
||||
demo:
|
||||
cols: 2
|
||||
|
@ -2,11 +2,11 @@
|
||||
category: Components
|
||||
title: Anchor
|
||||
cover: https://gw.alipayobjects.com/zos/bmw-prod/669b87c5-7b44-4c99-a5ea-4c38f8004788.svg
|
||||
demo:
|
||||
cols: 2
|
||||
group:
|
||||
title: Navigation
|
||||
order: 3
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Hyperlinks to scroll on one page.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
category: Components
|
||||
subtitle: 锚点
|
||||
title: Anchor
|
||||
subtitle: 锚点
|
||||
cover: https://gw.alipayobjects.com/zos/bmw-prod/669b87c5-7b44-4c99-a5ea-4c38f8004788.svg
|
||||
demo:
|
||||
cols: 2
|
||||
|
@ -1,11 +1,12 @@
|
||||
---
|
||||
category: Components
|
||||
cols: 2
|
||||
title: AutoComplete
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg
|
||||
group:
|
||||
title: Data Entry
|
||||
order: 4
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Autocomplete function of input field.
|
||||
|
@ -1,12 +1,13 @@
|
||||
---
|
||||
category: Components
|
||||
subtitle: 自动完成
|
||||
cols: 2
|
||||
title: AutoComplete
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg
|
||||
group:
|
||||
title: 数据录入
|
||||
order: 4
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
输入框自动完成功能。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Display
|
||||
title: Calendar
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/dPQmLq08DI/Calendar.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Container for displaying data in calendar form.
|
||||
|
@ -4,8 +4,6 @@ group: 数据展示
|
||||
subtitle: 日历
|
||||
title: Calendar
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/dPQmLq08DI/Calendar.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
按照日历形式展示数据的容器。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Display
|
||||
title: Card
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/keNB-R8Y9/Card.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Simple rectangular container.
|
||||
|
@ -4,8 +4,6 @@ group: 数据展示
|
||||
title: Card
|
||||
subtitle: 卡片
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/NqXt8DJhky/Card.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
通用卡片容器。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Display
|
||||
title: Descriptions
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/MjtG9_FOI/Descriptions.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Display multiple read-only fields in groups.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 描述列表
|
||||
group: 数据展示
|
||||
title: Descriptions
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/MjtG9_FOI/Descriptions.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
成组展示多个只读字段。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Display
|
||||
title: Empty
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/MNbKfLBVb/Empty.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Empty state placeholder.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 空状态
|
||||
group: 数据展示
|
||||
title: Empty
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/MNbKfLBVb/Empty.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
空状态时的展示占位图。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Entry
|
||||
title: Form
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/ORmcdeaoO/Form.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
High performance Form component with data scope management. Including data collection, verification, and styles.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 表单
|
||||
group: 数据录入
|
||||
title: Form
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/ORmcdeaoO/Form.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
高性能表单控件,自带数据域管理。包含数据录入、校验以及对应样式。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Layout
|
||||
title: Grid
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/5rWLU27so/Grid.svg
|
||||
demo:
|
||||
cols: 1
|
||||
---
|
||||
|
||||
24 Grids System.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 栅格
|
||||
group: 布局
|
||||
title: Grid
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/5rWLU27so/Grid.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
24 栅格系统。
|
||||
|
@ -4,8 +4,6 @@ group: 数据展示
|
||||
title: List
|
||||
subtitle: 列表
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/5FrZKStG_/List.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
通用列表。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Navigation
|
||||
title: Pagination
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/1vqv2bj68/Pagination.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
A long list can be divided into several pages using `Pagination`, and only one page will be loaded at a time.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 分页
|
||||
group: 导航
|
||||
title: Pagination
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/1vqv2bj68/Pagination.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
采用分页的形式分隔长列表,每次只加载一个页面。
|
||||
|
@ -3,8 +3,6 @@ group: Feedback
|
||||
category: Components
|
||||
title: Result
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/9nepwjaLa/Result.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Used to feed back the results of a series of operational tasks.
|
||||
|
@ -4,8 +4,6 @@ category: Components
|
||||
title: Result
|
||||
subtitle: 结果
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/9nepwjaLa/Result.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
用于反馈一系列操作任务的处理结果。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Feedback
|
||||
title: Skeleton
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Provide a placeholder while you wait for content to load, or to visualise content that doesn't exist yet.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 骨架屏
|
||||
group: 反馈
|
||||
title: Skeleton
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/KpcciCJgv/Skeleton.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
在需要等待加载内容的位置提供一个占位图形组合。
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Layout
|
||||
title: Space
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/wc6%263gJ0Y8/Space.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Set components spacing.
|
||||
|
@ -4,8 +4,6 @@ group: 布局
|
||||
subtitle: 间距
|
||||
title: Space
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/wc6%263gJ0Y8/Space.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
设置组件之间的间距。
|
||||
|
@ -1,3 +1,3 @@
|
||||
import { extendTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
extendTest('table');
|
||||
extendTest('table', { skip: ['ajax.tsx'] });
|
||||
|
@ -1,3 +1,3 @@
|
||||
import demoTest from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('table');
|
||||
demoTest('table', { skip: ['ajax.tsx'] });
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Display
|
||||
title: Tabs
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/lkI2hNEDr2V/Tabs.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Tabs make it easy to switch between different views.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 标签页
|
||||
group: 数据展示
|
||||
title: Tabs
|
||||
cover: https://gw.alipayobjects.com/zos/antfincdn/lkI2hNEDr2V/Tabs.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
选项卡切换组件。
|
||||
@ -45,6 +43,7 @@ return <Tabs items={items} />;
|
||||
|
||||
## 代码演示
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<code src="./demo/deprecated.tsx">基础用法(废弃的语法糖)</code>
|
||||
<code src="./demo/basic.tsx">基本</code>
|
||||
<code src="./demo/disabled.tsx">禁用</code>
|
||||
@ -67,29 +66,29 @@ return <Tabs items={items} />;
|
||||
|
||||
### Tabs
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| ---------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------- | ------------- |
|
||||
| activeKey | 当前激活 tab 面板的 key | string | - | |
|
||||
| addIcon | 自定义添加按钮 | ReactNode | - | 4.4.0 |
|
||||
| animated | 是否使用动画切换 Tabs, 仅生效于 `tabPosition="top"` | boolean\| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } | |
|
||||
| centered | 标签居中展示 | boolean | false | 4.4.0 |
|
||||
| defaultActiveKey | 初始化选中面板的 key,如果没有设置 activeKey | string | `第一个面板` | |
|
||||
| hideAdd | 是否隐藏加号图标,在 `type="editable-card"` 时有效 | boolean | false | |
|
||||
| items | 配置选项卡内容 | [TabItemType](#TabItemType) | [] | 4.23.0 |
|
||||
| moreIcon | 自定义折叠 icon | ReactNode | <EllipsisOutlined /> | 4.14.0 |
|
||||
| popupClassName | 更多菜单的 `className` | string | - | 4.21.0 |
|
||||
| renderTabBar | 替换 TabBar,用于二次封装标签头 | (props: DefaultTabBarProps, DefaultTabBar: React.ComponentClass) => React.ReactElement | - | |
|
||||
| size | 大小,提供 `large` `middle` 和 `small` 三种大小 | string | `middle` | |
|
||||
| tabBarExtraContent | tab bar 上额外的元素 | ReactNode \| {left?: ReactNode, right?: ReactNode} | - | object: 4.6.0 |
|
||||
| tabBarGutter | tabs 之间的间隙 | number | - | |
|
||||
| tabBarStyle | tab bar 的样式对象 | CSSProperties | - | |
|
||||
| tabPosition | 页签位置,可选值有 `top` `right` `bottom` `left` | string | `top` | |
|
||||
| destroyInactiveTabPane | 被隐藏时是否销毁 DOM 结构 | boolean | false | |
|
||||
| type | 页签的基本样式,可选 `line`、`card` `editable-card` 类型 | string | `line` | |
|
||||
| onChange | 切换面板的回调 | function(activeKey) {} | - | |
|
||||
| onEdit | 新增和删除页签的回调,在 `type="editable-card"` 时有效 | (action === 'add' ? event : targetKey, action): void | - | |
|
||||
| onTabClick | tab 被点击的回调 | function(key: string, event: MouseEvent) | - | |
|
||||
| onTabScroll | tab 滚动时触发 | function({ direction: `left` \| `right` \| `top` \| `bottom` }) | - | 4.3.0 |
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| activeKey | 当前激活 tab 面板的 key | string | - | |
|
||||
| addIcon | 自定义添加按钮 | ReactNode | - | 4.4.0 |
|
||||
| animated | 是否使用动画切换 Tabs, 仅生效于 `tabPosition="top"` | boolean\| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } | |
|
||||
| centered | 标签居中展示 | boolean | false | 4.4.0 |
|
||||
| defaultActiveKey | 初始化选中面板的 key,如果没有设置 activeKey | string | `第一个面板` | |
|
||||
| hideAdd | 是否隐藏加号图标,在 `type="editable-card"` 时有效 | boolean | false | |
|
||||
| items | 配置选项卡内容 | [TabItemType](#TabItemType) | [] | 4.23.0 |
|
||||
| moreIcon | 自定义折叠 icon | ReactNode | <EllipsisOutlined /> | 4.14.0 |
|
||||
| popupClassName | 更多菜单的 `className` | string | - | 4.21.0 |
|
||||
| renderTabBar | 替换 TabBar,用于二次封装标签头 | (props: DefaultTabBarProps, DefaultTabBar: React.ComponentClass) => React.ReactElement | - | |
|
||||
| size | 大小,提供 `large` `middle` 和 `small` 三种大小 | string | `middle` | |
|
||||
| tabBarExtraContent | tab bar 上额外的元素 | ReactNode \| {left?: ReactNode, right?: ReactNode} | - | object: 4.6.0 |
|
||||
| tabBarGutter | tabs 之间的间隙 | number | - | |
|
||||
| tabBarStyle | tab bar 的样式对象 | CSSProperties | - | |
|
||||
| tabPosition | 页签位置,可选值有 `top` `right` `bottom` `left` | string | `top` | |
|
||||
| destroyInactiveTabPane | 被隐藏时是否销毁 DOM 结构 | boolean | false | |
|
||||
| type | 页签的基本样式,可选 `line`、`card` `editable-card` 类型 | string | `line` | |
|
||||
| onChange | 切换面板的回调 | function(activeKey) {} | - | |
|
||||
| onEdit | 新增和删除页签的回调,在 `type="editable-card"` 时有效 | (action === 'add' ? event : targetKey, action): void | - | |
|
||||
| onTabClick | tab 被点击的回调 | function(key: string, event: MouseEvent) | - | |
|
||||
| onTabScroll | tab 滚动时触发 | function({ direction: `left` \| `right` \| `top` \| `bottom` }) | - | 4.3.0 |
|
||||
|
||||
> 更多属性查看 [rc-tabs tabs](https://github.com/react-component/tabs#tabs)
|
||||
|
||||
|
@ -3,8 +3,6 @@ category: Components
|
||||
group: Data Entry
|
||||
title: Transfer
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/QAXskNI4G/Transfer.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
Double column transfer choice box.
|
||||
|
@ -4,8 +4,6 @@ subtitle: 穿梭框
|
||||
group: 数据录入
|
||||
title: Transfer
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/QAXskNI4G/Transfer.svg
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
双栏穿梭选择框。
|
||||
|
Loading…
Reference in New Issue
Block a user