forked from GavinZhuLei/vue-form-making
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
49 lines (40 loc) · 1.04 KB
/
main.js
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
48
49
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import VueI18n from 'vue-i18n'
import 'element-ui/lib/theme-chalk/index.css'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
Vue.use(VueI18n)
const messages = {
'en-US': {
header: {
title: 'FormMaking',
document: 'Docs',
pricing: 'Pricing',
advanced: 'Advanced',
}
},
'zh-CN': {
header: {
title: '表单设计器',
document: '使用文档',
pricing: '商业授权',
advanced: '高级版本',
}
}
}
Vue.locale('en-US', {...enLocale, ...messages['en-US']})
Vue.locale('zh-CN', {...zhLocale, ...messages['zh-CN']})
Vue.config.lang = 'zh-CN'
Vue.use(ElementUI, { size: 'small' })
// import 'form-making/dist/FormMaking.css'
// import FormMaking from 'form-making'
import FormMaking from './index'
Vue.use(FormMaking)
Vue.config.productionTip = false
new Vue({
router,
render: h => h(App)
}).$mount('#app')