From 30a4143afc53aacdffbe09ec2111a8feed4020cb Mon Sep 17 00:00:00 2001 From: MadCcc Date: Tue, 23 Jan 2024 20:33:53 +0800 Subject: [PATCH] docs: add pagination design page (#47119) --- .../pagination/design/behavior-pattern.tsx | 39 +++++++++++++++++++ components/pagination/design/demo/basic.tsx | 6 +++ .../pagination/design/demo/large-amount.tsx | 6 +++ components/pagination/design/demo/mini.tsx | 20 ++++++++++ .../pagination/design/demo/page-size.tsx | 6 +++ .../pagination/design/demo/quick-jump.tsx | 6 +++ components/pagination/design/demo/simple.tsx | 8 ++++ components/pagination/design/demo/total.tsx | 13 +++++++ .../pagination/index.$tab-design.zh-CN.md | 27 +++++++++++++ 9 files changed, 131 insertions(+) create mode 100644 components/pagination/design/behavior-pattern.tsx create mode 100644 components/pagination/design/demo/basic.tsx create mode 100644 components/pagination/design/demo/large-amount.tsx create mode 100644 components/pagination/design/demo/mini.tsx create mode 100644 components/pagination/design/demo/page-size.tsx create mode 100644 components/pagination/design/demo/quick-jump.tsx create mode 100644 components/pagination/design/demo/simple.tsx create mode 100644 components/pagination/design/demo/total.tsx create mode 100644 components/pagination/index.$tab-design.zh-CN.md diff --git a/components/pagination/design/behavior-pattern.tsx b/components/pagination/design/behavior-pattern.tsx new file mode 100644 index 0000000000..04682aebb3 --- /dev/null +++ b/components/pagination/design/behavior-pattern.tsx @@ -0,0 +1,39 @@ +import React from 'react'; + +import BehaviorMap from '../../../.dumi/theme/common/BehaviorMap'; + +const BehaviorPattern: React.FC = () => ( + +); + +export default BehaviorPattern; diff --git a/components/pagination/design/demo/basic.tsx b/components/pagination/design/demo/basic.tsx new file mode 100644 index 0000000000..730c16b65c --- /dev/null +++ b/components/pagination/design/demo/basic.tsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { Pagination } from 'antd'; + +const App: React.FC = () => ; + +export default App; diff --git a/components/pagination/design/demo/large-amount.tsx b/components/pagination/design/demo/large-amount.tsx new file mode 100644 index 0000000000..72b5eb7589 --- /dev/null +++ b/components/pagination/design/demo/large-amount.tsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { Pagination } from 'antd'; + +const App: React.FC = () => ; + +export default App; diff --git a/components/pagination/design/demo/mini.tsx b/components/pagination/design/demo/mini.tsx new file mode 100644 index 0000000000..52b5b84cee --- /dev/null +++ b/components/pagination/design/demo/mini.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import { Flex, Pagination } from 'antd'; + +const App: React.FC = () => ( + + + + + + `第 ${range.join('-')} 条 / 共 ${total} 条`} + /> + +); + +export default App; diff --git a/components/pagination/design/demo/page-size.tsx b/components/pagination/design/demo/page-size.tsx new file mode 100644 index 0000000000..bd4f45e7ff --- /dev/null +++ b/components/pagination/design/demo/page-size.tsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { Pagination } from 'antd'; + +const App: React.FC = () => ; + +export default App; diff --git a/components/pagination/design/demo/quick-jump.tsx b/components/pagination/design/demo/quick-jump.tsx new file mode 100644 index 0000000000..fc917c4ef1 --- /dev/null +++ b/components/pagination/design/demo/quick-jump.tsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { Pagination } from 'antd'; + +const App: React.FC = () => ; + +export default App; diff --git a/components/pagination/design/demo/simple.tsx b/components/pagination/design/demo/simple.tsx new file mode 100644 index 0000000000..8badd57a67 --- /dev/null +++ b/components/pagination/design/demo/simple.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Pagination } from 'antd'; + +const App: React.FC = () => ( + +); + +export default App; diff --git a/components/pagination/design/demo/total.tsx b/components/pagination/design/demo/total.tsx new file mode 100644 index 0000000000..7912161a50 --- /dev/null +++ b/components/pagination/design/demo/total.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { Pagination } from 'antd'; + +const App: React.FC = () => ( + `第 ${range.join('-')} 条 / 共 ${total} 条`} + /> +); + +export default App; diff --git a/components/pagination/index.$tab-design.zh-CN.md b/components/pagination/index.$tab-design.zh-CN.md new file mode 100644 index 0000000000..973c9771ae --- /dev/null +++ b/components/pagination/index.$tab-design.zh-CN.md @@ -0,0 +1,27 @@ +## 组件定义 + +Pagination的本质是控制单页内信息数量,可跳转页面。 + + + +## 基础使用 + +少量页面 + +大量页面 + +## 交互变体 + +调整单页展示条数 + +快速跳转 + +了解数据总量 + +## 样式变体 + +简洁分页 + +迷你版分页 + +上一步和下一步