Browse Source

docs: update introduce.md

pull/38696/head
afc163 2 years ago
parent
commit
fa7da0161b
  1. 9
      docs/react/introduce.en-US.md
  2. 9
      docs/react/introduce.zh-CN.md

9
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(<DatePicker />, mountNode);
const App = () => {
return <DatePicker />;
};
export default App;
```
### Use modularized antd
@ -99,6 +103,7 @@ ReactDOM.render(<DatePicker />, 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)

9
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(<DatePicker />, mountNode);
const App = () => {
return <DatePicker />;
};
export default App;
```
### 按需加载
@ -100,6 +104,7 @@ ReactDOM.render(<DatePicker />, 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)

Loading…
Cancel
Save