-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathelement.js
More file actions
32 lines (29 loc) · 817 Bytes
/
element.js
File metadata and controls
32 lines (29 loc) · 817 Bytes
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
import Vue from 'vue'
<%_ if (options.import === 'full') { _%>
import Element from 'element-ui'
<%_ if (options.customTheme) { _%>
import '../element-variables.scss'
<%_ } else { _%>
import 'element-ui/lib/theme-chalk/index.css'
<%_ } _%>
<%_ if (options.lang !== 'zh-CN') { _%>
import locale from 'element-ui/lib/locale/lang/<%= options.lang %>'
Vue.use(Element, { locale })
<%_ } else { _%>
Vue.use(Element)
<%_ } _%>
<%_ } else { _%>
import {
<%_ options.components.forEach(function(item){ _%>
<%= item %>,
<%_ }) _%>
} from 'element-ui'
<%_ if (options.lang !== 'zh-CN') { _%>
import lang from 'element-ui/lib/locale/lang/<%= options.lang %>'
import locale from 'element-ui/lib/locale'
locale.use(lang)
<%_ } _%>
<%_ options.components.forEach(function(item){ _%>
Vue.use(<%= item %>);
<%_ }) _%>
<%_ } _%>