Browse Source

docs: 5.0.0 changelog (#38642)

* docs: 5.0.0 changelog

* chore: bump version

* chore: english changelog

* chore: code clean

* docs: add missing break line

* docs: eng version pretter

* chore: update

* chore: clean

* chore: remove backtop doc

* chore: update changelog

* chore: code clean

* docs: update

* rm eng log

Co-authored-by: 二货机器人 <smith3816@gmail.com>
pull/38619/head
MadCcc 2 years ago
committed by GitHub
parent
commit
73139eb5af
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .antd-tools.config.js
  2. 14
      .dumi/theme/plugin.ts
  3. 3451
      CHANGELOG.en-US.md
  4. 3454
      CHANGELOG.zh-CN.md
  5. 34
      components/back-top/index.en-US.md
  6. 35
      components/back-top/index.zh-CN.md
  7. 2
      package.json

1
.antd-tools.config.js

@ -29,5 +29,4 @@ module.exports = {
finalize: finalizeDist,
},
bail: true,
tag: 'next',
};

14
.dumi/theme/plugin.ts

@ -44,7 +44,7 @@ const RoutesPlugin = (api: IApi) => {
api.registerTechStack(() => new AntdReactTechStack());
api.modifyRoutes(routes => {
api.modifyRoutes((routes) => {
// TODO: append extra routes, such as home, changelog, form-v3
const extraRoutesList: IRoute[] = [
@ -64,24 +64,24 @@ const RoutesPlugin = (api: IApi) => {
},
];
extraRoutesList.forEach(itemRoute => {
extraRoutesList.forEach((itemRoute) => {
routes[itemRoute.path] = itemRoute;
});
return routes;
});
api.modifyExportHTMLFiles(files =>
api.modifyExportHTMLFiles((files) =>
files
// exclude dynamic route path, to avoid deploy failed by `:id` directory
.filter(f => !f.path.includes(':'))
.filter((f) => !f.path.includes(':'))
// FIXME: workaround to make emotion support react 18 pipeableStream
// ref: https://github.com/emotion-js/emotion/issues/2800#issuecomment-1221296308
.map(file => {
.map((file) => {
let styles = '';
// extract all emotion style tags from body
file.content = file.content.replace(/<style data-emotion[\s\S\n]+?<\/style>/g, s => {
file.content = file.content.replace(/<style data-emotion[\s\S\n]+?<\/style>/g, (s) => {
styles += s;
return '';
@ -95,7 +95,7 @@ const RoutesPlugin = (api: IApi) => {
);
// add ssr css file to html
api.modifyConfig(memo => {
api.modifyConfig((memo) => {
memo.styles ??= [];
memo.styles.push(`/${ssrCssFileName}`);

3451
CHANGELOG.en-US.md

File diff suppressed because it is too large

3454
CHANGELOG.zh-CN.md

File diff suppressed because it is too large

34
components/back-top/index.en-US.md

@ -1,34 +0,0 @@
---
category: Components
title: BackTop
cover: https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg
demo:
cols: 2
group: Other
---
`BackTop` makes it easy to go back to the top of the page.
## When To Use
- When the page content is very long.
- When you need to go back to the top very frequently in order to view the contents.
## Examples
<!-- prettier-ignore -->
<code src="./demo/basic.tsx">Basic</code>
<code src="./demo/custom.tsx" iframe="400">Custom style</code>
## API
> The distance to the bottom is set to `50px` by default, which is overridable.
>
> If you decide to use custom styles, please note the size limit: no more than `40px * 40px`.
| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
| duration | Time to return to top(ms) | number | 450 | 4.4.0 |
| target | Specifies the scrollable area dom node | () => HTMLElement | () => window | |
| visibilityHeight | The BackTop button will not show until the scroll height reaches this value | number | 400 | |
| onClick | A callback function, which can be executed when you click the button | function | - | |

35
components/back-top/index.zh-CN.md

@ -1,35 +0,0 @@
---
category: Components
subtitle: 回到顶部
title: BackTop
cover: https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg
demo:
cols: 2
group: 其他
---
返回页面顶部的操作按钮。
## 何时使用
- 当页面内容区域比较长时;
- 当用户需要频繁返回顶部查看相关内容时。
## 代码演示
<!-- prettier-ignore -->
<code src="./demo/basic.tsx">基本</code>
<code src="./demo/custom.tsx" iframe="400">自定义样式</code>
## API
> 有默认样式,距离底部 `50px`,可覆盖。
>
> 自定义样式宽高不大于 40px \* 40px。
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| duration | 回到顶部所需时间(ms) | number | 450 | 4.4.0 |
| target | 设置需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | () => HTMLElement | () => window | |
| visibilityHeight | 滚动高度达到此参数值才出现 BackTop | number | 400 | |
| onClick | 点击按钮的回调函数 | function | - | |

2
package.json

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "5.0.0-rc.3",
"version": "5.0.0",
"description": "An enterprise-class UI design language and React components implementation",
"title": "Ant Design",
"keywords": [

Loading…
Cancel
Save