docs(introduce): update docs (#6539)
* docs(introduce): update docs * docs(introduce): add Dollar * Update introduce.zh-CN.md * Update introduce.en-US.md --------- Co-authored-by: tangjinzhou <415800467@qq.com>pull/6541/head
parent
9fdc297686
commit
fd8af2322c
|
@ -40,7 +40,7 @@ Following the Ant Design specification, we developed a Vue UI library `antd` tha
|
||||||
|
|
||||||
- Stable: [](https://www.npmjs.org/package/ant-design-vue)
|
- Stable: [](https://www.npmjs.org/package/ant-design-vue)
|
||||||
|
|
||||||
You can subscribe to this feed for new version notifications: https://github.com/vueComponent/ant-design-vue/releases.atom
|
You can subscribe to this feed for new version notifications: <https://github.com/vueComponent/ant-design-vue/releases.atom>
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -98,6 +98,41 @@ import 'ant-design-vue/dist/reset.css';
|
||||||
|
|
||||||
`ant-design-vue` supports ES modules tree shaking by default.
|
`ant-design-vue` supports ES modules tree shaking by default.
|
||||||
|
|
||||||
|
### Automatically import components on demand
|
||||||
|
|
||||||
|
#### [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
|
||||||
|
|
||||||
|
If you're using 'Vite', we recommend using 'unplugin-vue-components'
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install unplugin-vue-components -D
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
// vite.config.js
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import Components from 'unplugin-vue-components/vite';
|
||||||
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
// ...
|
||||||
|
Components({
|
||||||
|
resolvers: [
|
||||||
|
AntDesignVueResolver({
|
||||||
|
importStyle: false, // css in js
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then import 'ant-design-vue' components directly in your code, and the plugin will automatically convert your code to 'import {Button} from 'ant-design-vue''.
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
import { Button } from 'ant-design-vue';
|
||||||
|
```
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Home Page](https://www.antdv.com/)
|
- [Home Page](https://www.antdv.com/)
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
- 稳定版:[](https://www.npmjs.org/package/ant-design-vue)
|
- 稳定版:[](https://www.npmjs.org/package/ant-design-vue)
|
||||||
|
|
||||||
你可以订阅:https://github.com/vueComponent/ant-design-vue/releases.atom 来获得稳定版发布的通知。
|
你可以订阅:<https://github.com/vueComponent/ant-design-vue/releases.atom> 来获得稳定版发布的通知。
|
||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
|
@ -98,6 +98,41 @@ import 'ant-design-vue/dist/reset.css';
|
||||||
|
|
||||||
`ant-design-vue` 默认支持基于 ES modules 的 tree shaking。
|
`ant-design-vue` 默认支持基于 ES modules 的 tree shaking。
|
||||||
|
|
||||||
|
### 自动按需引入组件
|
||||||
|
|
||||||
|
#### [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
|
||||||
|
|
||||||
|
如果你使用的是 `Vite` ,我们推荐使用 `unplugin-vue-components`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install unplugin-vue-components -D
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
// vite.config.js
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import Components from 'unplugin-vue-components/vite';
|
||||||
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
// ...
|
||||||
|
Components({
|
||||||
|
resolvers: [
|
||||||
|
AntDesignVueResolver({
|
||||||
|
importStyle: false, // css in js
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
然后你可以在代码中直接引入 `ant-design-vue` 的组件,插件会自动将代码转化为 `import { Button } from 'ant-design-vue'` 的形式。
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
import { Button } from 'ant-design-vue';
|
||||||
|
```
|
||||||
|
|
||||||
## 链接
|
## 链接
|
||||||
|
|
||||||
- [首页](https://www.antdv.com/)
|
- [首页](https://www.antdv.com/)
|
||||||
|
|
Loading…
Reference in New Issue