Skip to content

Commit

Permalink
add fully import doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Apr 20, 2018
1 parent b44f7cb commit bafe6c6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/vue/getting-started.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,23 @@ $ vue init webpack antd-demo
```bash
$ npm i --save vue-antd-ui
```
**Fully import**
```jsx
import Vue from 'vue'
import Antd from 'vue-antd-ui'
import App from './App'
Vue.config.productionTip = false

Vue.use(Antd)

/* eslint-disable no-new */
new Vue({
el: '#app',
components: { App },
template: '<App/>'
})
```
The above imports Antd entirely. Note that CSS file needs to be imported separately.

**Only import the components you need**
```jsx
Expand Down
19 changes: 19 additions & 0 deletions docs/vue/getting-started.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,27 @@ $ vue init webpack antd-demo
$ npm i --save vue-antd-ui
```

**完整引入**

```jsx
import Vue from 'vue'
import Antd from 'vue-antd-ui'
import App from './App'
Vue.config.productionTip = false

Vue.use(Antd)

/* eslint-disable no-new */
new Vue({
el: '#app',
components: { App },
template: '<App/>'
})
```
以上代码便完成了 Antd 的引入。需要注意的是,样式文件需要单独引入。

**局部导入组件**

```jsx
import Vue from 'vue'
import { Button, message } from 'vue-antd-ui'
Expand Down

0 comments on commit bafe6c6

Please sign in to comment.