File tree 2 files changed +35
-0
lines changed
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
36
36
``` bash
37
37
$ npm i --save vue-antd-ui
38
38
```
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)
39
47
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.
40
56
41
57
** Only import the components you need**
42
58
``` jsx
Original file line number Diff line number Diff line change @@ -38,8 +38,27 @@ $ vue init webpack antd-demo
38
38
$ npm i --save vue-antd-ui
39
39
```
40
40
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 的引入。需要注意的是,样式文件需要单独引入。
41
59
42
60
** 局部导入组件**
61
+
43
62
``` jsx
44
63
import Vue from ' vue'
45
64
import { Button , message } from ' vue-antd-ui'
You can’t perform that action at this time.
0 commit comments