# 快速开始
# 环境说明
- vue 版本:2.x
- element-ui 版本:2.x
# 安装
npm i element-ui -s
npm i @easyui/element-ui-pro -s
1
2
2
# 全量引入
import Vue from "vue";
import ElementUI from "element-ui";
import ElementUIPro from "@easyui/element-ui-pro";
import "element-ui/lib/theme-chalk/index.css";
import App from "./App.vue";
Vue.use(ElementUI);
// 全量引入 ElementUIPro 组件
Vue.use(ElementUIPro);
new Vue({
render: h => h(App)
}).$mount("#app");
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# 按需引入
import Vue from "vue";
import ElementUI from "element-ui";
import {
SSpace,
SLayout,
SLayoutMain,
SLayoutSide,
SFrame,
SFramePane,
SForm,
SFormItem,
SSearchForm,
SModalForm,
SList,
SListItem,
SSortList,
STable,
SSortTable,
SModal,
SDrawer
} from "@easyui/element-ui-pro";
import "element-ui/lib/theme-chalk/index.css";
import App from "./App.vue";
Vue.use(ElementUI);
// 按需引入 ElementUIPro 组件
Vue.use(SSpace);
Vue.use(SLayout);
Vue.use(SLayoutMain);
Vue.use(SLayoutSide);
Vue.use(SFrame);
Vue.use(SFramePane);
Vue.use(SForm);
Vue.use(SFormItem);
Vue.use(SSearchForm);
Vue.use(SModalForm);
Vue.use(SList);
Vue.use(SListItem);
Vue.use(SSortList);
Vue.use(STable);
Vue.use(SSortTable);
Vue.use(SModal);
Vue.use(SDrawer);
new Vue({
render: h => h(App)
}).$mount("#app");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47