add fully import doc

pull/9/merge
tangjinzhou 2018-04-20 18:24:52 +08:00
parent c1811d73db
commit 5974c09824
2 changed files with 35 additions and 0 deletions

View File

@ -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

View File

@ -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'