File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,23 @@ $ vue init webpack antd-demo
3636``` bash
3737$ npm i --save vue-antd-ui
3838```
39+ ** Fully import**
40+ ``` jsx
41+ import Vue from ' vue'
42+ import Antd from ' vue-antd-ui'
43+ import App from ' ./App'
44+ Vue .config .productionTip = false
45+
46+ Vue .use (Antd)
3947
48+ /* eslint-disable no-new */
49+ new Vue ({
50+ el: ' #app' ,
51+ components: { App },
52+ template: ' <App/>'
53+ })
54+ ```
55+ The above imports Antd entirely. Note that CSS file needs to be imported separately.
4056
4157** Only import the components you need**
4258``` jsx
Original file line number Diff line number Diff line change @@ -38,8 +38,27 @@ $ vue init webpack antd-demo
3838$ npm i --save vue-antd-ui
3939```
4040
41+ ** 完整引入**
42+
43+ ``` jsx
44+ import Vue from ' vue'
45+ import Antd from ' vue-antd-ui'
46+ import App from ' ./App'
47+ Vue .config .productionTip = false
48+
49+ Vue .use (Antd)
50+
51+ /* eslint-disable no-new */
52+ new Vue ({
53+ el: ' #app' ,
54+ components: { App },
55+ template: ' <App/>'
56+ })
57+ ```
58+ 以上代码便完成了 Antd 的引入。需要注意的是,样式文件需要单独引入。
4159
4260** 局部导入组件**
61+
4362``` jsx
4463import Vue from ' vue'
4564import { Button , message } from ' vue-antd-ui'
You can’t perform that action at this time.
0 commit comments