mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
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>
This commit is contained in:
parent
f5ed8fb29c
commit
73139eb5af
@ -29,5 +29,4 @@ module.exports = {
|
|||||||
finalize: finalizeDist,
|
finalize: finalizeDist,
|
||||||
},
|
},
|
||||||
bail: true,
|
bail: true,
|
||||||
tag: 'next',
|
|
||||||
};
|
};
|
||||||
|
@ -44,7 +44,7 @@ const RoutesPlugin = (api: IApi) => {
|
|||||||
|
|
||||||
api.registerTechStack(() => new AntdReactTechStack());
|
api.registerTechStack(() => new AntdReactTechStack());
|
||||||
|
|
||||||
api.modifyRoutes(routes => {
|
api.modifyRoutes((routes) => {
|
||||||
// TODO: append extra routes, such as home, changelog, form-v3
|
// TODO: append extra routes, such as home, changelog, form-v3
|
||||||
|
|
||||||
const extraRoutesList: IRoute[] = [
|
const extraRoutesList: IRoute[] = [
|
||||||
@ -64,24 +64,24 @@ const RoutesPlugin = (api: IApi) => {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
extraRoutesList.forEach(itemRoute => {
|
extraRoutesList.forEach((itemRoute) => {
|
||||||
routes[itemRoute.path] = itemRoute;
|
routes[itemRoute.path] = itemRoute;
|
||||||
});
|
});
|
||||||
|
|
||||||
return routes;
|
return routes;
|
||||||
});
|
});
|
||||||
|
|
||||||
api.modifyExportHTMLFiles(files =>
|
api.modifyExportHTMLFiles((files) =>
|
||||||
files
|
files
|
||||||
// exclude dynamic route path, to avoid deploy failed by `:id` directory
|
// 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
|
// FIXME: workaround to make emotion support react 18 pipeableStream
|
||||||
// ref: https://github.com/emotion-js/emotion/issues/2800#issuecomment-1221296308
|
// ref: https://github.com/emotion-js/emotion/issues/2800#issuecomment-1221296308
|
||||||
.map(file => {
|
.map((file) => {
|
||||||
let styles = '';
|
let styles = '';
|
||||||
|
|
||||||
// extract all emotion style tags from body
|
// 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;
|
styles += s;
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
@ -95,7 +95,7 @@ const RoutesPlugin = (api: IApi) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// add ssr css file to html
|
// add ssr css file to html
|
||||||
api.modifyConfig(memo => {
|
api.modifyConfig((memo) => {
|
||||||
memo.styles ??= [];
|
memo.styles ??= [];
|
||||||
memo.styles.push(`/${ssrCssFileName}`);
|
memo.styles.push(`/${ssrCssFileName}`);
|
||||||
|
|
||||||
|
3451
CHANGELOG.en-US.md
3451
CHANGELOG.en-US.md
File diff suppressed because it is too large
Load Diff
3454
CHANGELOG.zh-CN.md
3454
CHANGELOG.zh-CN.md
File diff suppressed because it is too large
Load Diff
@ -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 | - | |
|
|
@ -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 | - | |
|
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "antd",
|
"name": "antd",
|
||||||
"version": "5.0.0-rc.3",
|
"version": "5.0.0",
|
||||||
"description": "An enterprise-class UI design language and React components implementation",
|
"description": "An enterprise-class UI design language and React components implementation",
|
||||||
"title": "Ant Design",
|
"title": "Ant Design",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
Reference in New Issue
Block a user