From fa7da0161b2b17c96fdf0447215aec5652d23095 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 18 Nov 2022 18:56:46 +0800 Subject: [PATCH] docs: update introduce.md --- docs/react/introduce.en-US.md | 9 +++++++-- docs/react/introduce.zh-CN.md | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/react/introduce.en-US.md b/docs/react/introduce.en-US.md index b3d55bfd71..390f918bdc 100644 --- a/docs/react/introduce.en-US.md +++ b/docs/react/introduce.en-US.md @@ -74,7 +74,7 @@ If you are in a bad network environment, you can try other registries and tools Add `script` and `link` tags in your browser and use the global variable `antd`. -We provide `antd.js` `antd.css` and `antd.min.js` `antd.min.css` under `antd/dist` in antd's npm package. You can also download these files directly from [![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd), [![](https://data.jsdelivr.com/v1/package/npm/antd/badge)](https://www.jsdelivr.com/package/npm/antd) or [unpkg](https://unpkg.com/antd/dist). +We provide `antd.js` and `antd.min.js` `reset.css` under [dist](https://unpkg.com/browse/antd@5.0.0/dist/) folder in antd's npm package. You can also download these files directly from [![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd), [![](https://data.jsdelivr.com/v1/package/npm/antd/badge)](https://www.jsdelivr.com/package/npm/antd) or [unpkg](https://unpkg.com/antd/dist). > **We strongly discourage loading the entire files** this will add bloat to your application and make it more difficult to receive bugfixes and updates. Antd is intended to be used in conjunction with a build tool, such as [webpack](https://webpack.github.io/), which will make it easy to import only the parts of antd that you are using. @@ -85,7 +85,11 @@ We provide `antd.js` `antd.css` and `antd.min.js` `antd.min.css` under `antd/dis ```jsx import { DatePicker } from 'antd'; -ReactDOM.render(, mountNode); +const App = () => { + return ; +}; + +export default App; ``` ### Use modularized antd @@ -99,6 +103,7 @@ ReactDOM.render(, mountNode); ## Links - [Home page](/) +- [China Mirrors](https://github.com/ant-design/ant-design/issues/25661) - [Components](/components/overview) - [Ant Design Pro](https://pro.ant.design/) - [Ant Design Charts](https://charts.ant.design) diff --git a/docs/react/introduce.zh-CN.md b/docs/react/introduce.zh-CN.md index 398e536bef..b898ef0739 100644 --- a/docs/react/introduce.zh-CN.md +++ b/docs/react/introduce.zh-CN.md @@ -74,7 +74,7 @@ $ yarn add antd 在浏览器中使用 `script` 和 `link` 标签直接引入文件,并使用全局变量 `antd`。 -我们在 npm 发布包内的 `antd/dist` 目录下提供了 `antd.js` `antd.css` 以及 `antd.min.js` `antd.min.css`。你也可以通过 [![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd),[![](https://data.jsdelivr.com/v1/package/npm/antd/badge)](https://www.jsdelivr.com/package/npm/antd) 或 [UNPKG](https://unpkg.com/antd/dist/) 进行下载。 +我们在 npm 发布包内的 dist 目录下提供了 `antd.js`、`antd.min.js` 和 `reset.css`。你也可以通过 [![CDNJS](https://img.shields.io/cdnjs/v/antd.svg?style=flat-square)](https://cdnjs.com/libraries/antd),[![](https://data.jsdelivr.com/v1/package/npm/antd/badge)](https://www.jsdelivr.com/package/npm/antd) 或 [UNPKG](https://unpkg.com/antd/dist/) 进行下载。 > **强烈不推荐使用已构建文件**,这样无法按需加载,而且难以获得底层依赖模块的 bug 快速修复支持。 @@ -85,7 +85,11 @@ $ yarn add antd ```jsx import { DatePicker } from 'antd'; -ReactDOM.render(, mountNode); +const App = () => { + return ; +}; + +export default App; ``` ### 按需加载 @@ -100,6 +104,7 @@ ReactDOM.render(, mountNode); - [首页](/index) - [组件库](/components/overview) +- [国内镜像](https://github.com/ant-design/ant-design/issues/25661) - [Ant Design Pro](https://pro.ant.design/) - [Ant Design Charts](https://charts.ant.design) - [更新日志](/changelog)