From 5974c09824195e280e9664118b5ba06cb8d7afb0 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 20 Apr 2018 18:24:52 +0800 Subject: [PATCH] add fully import doc --- docs/vue/getting-started.en-US.md | 16 ++++++++++++++++ docs/vue/getting-started.zh-CN.md | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/docs/vue/getting-started.en-US.md b/docs/vue/getting-started.en-US.md index dc3444993..a5b356506 100644 --- a/docs/vue/getting-started.en-US.md +++ b/docs/vue/getting-started.en-US.md @@ -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: '' +}) +``` +The above imports Antd entirely. Note that CSS file needs to be imported separately. **Only import the components you need** ```jsx diff --git a/docs/vue/getting-started.zh-CN.md b/docs/vue/getting-started.zh-CN.md index 0732c6dc4..05b032865 100644 --- a/docs/vue/getting-started.zh-CN.md +++ b/docs/vue/getting-started.zh-CN.md @@ -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: '' +}) +``` +以上代码便完成了 Antd 的引入。需要注意的是,样式文件需要单独引入。 **局部导入组件** + ```jsx import Vue from 'vue' import { Button, message } from 'vue-antd-ui'