File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 31
31
"sortablejs" : " 1.5.1" ,
32
32
"vue" : " 2.3.3" ,
33
33
"vue-count-to" : " 1.0.5" ,
34
+ "vue-i18n" : " ^5.0.3" ,
34
35
"vue-multiselect" : " 2.0.0-beta.15" ,
35
36
"vue-router" : " 2.5.3" ,
36
37
"vuedraggable" : " 2.13.1" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Vue from 'vue';
4
4
import App from './App' ;
5
5
import router from './router' ;
6
6
import store from './store' ;
7
+
7
8
import ElementUI from 'element-ui' ;
8
9
import 'element-ui/lib/theme-default/index.css' ;
9
10
import 'assets/custom-theme/index.css' ; // 换肤版本element-ui css https://github.com/PanJiaChen/custom-element-theme
@@ -21,17 +22,26 @@ import vueWaves from './directive/waves';// 水波纹指令
21
22
import errLog from 'store/errLog' ; // error log组件
22
23
import './mock/index.js' ; // 该项目所有请求使用mockjs模拟
23
24
25
+ import VueI18n from 'vue-i18n' ;
26
+ import enLocale from 'element-ui/lib/locale/lang/en'
27
+ // import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
28
+
24
29
// register globally
25
30
Vue . component ( 'multiselect' , Multiselect ) ;
26
31
Vue . component ( 'Sticky' , Sticky ) ;
32
+ Vue . use ( VueI18n ) ;
27
33
Vue . use ( ElementUI ) ;
34
+
28
35
Vue . use ( vueWaves ) ;
29
36
30
37
// register global utility filters.
31
38
Object . keys ( filters ) . forEach ( key => {
32
39
Vue . filter ( key , filters [ key ] )
33
40
} ) ;
34
41
42
+ Vue . config . lang = 'en'
43
+ Vue . locale ( 'en' , enLocale )
44
+
35
45
// permissiom judge
36
46
function hasPermission ( roles , permissionRoles ) {
37
47
if ( roles . indexOf ( 'admin' ) >= 0 ) return true ; // admin权限 直接通过
You can’t perform that action at this time.
0 commit comments