Skip to content

Commit 399001d

Browse files
committed
init
1 parent cf1fb6c commit 399001d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"sortablejs": "1.5.1",
3232
"vue": "2.3.3",
3333
"vue-count-to": "1.0.5",
34+
"vue-i18n": "^5.0.3",
3435
"vue-multiselect": "2.0.0-beta.15",
3536
"vue-router": "2.5.3",
3637
"vuedraggable": "2.13.1",

src/main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Vue from 'vue';
44
import App from './App';
55
import router from './router';
66
import store from './store';
7+
78
import ElementUI from 'element-ui';
89
import 'element-ui/lib/theme-default/index.css';
910
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';// 水波纹指令
2122
import errLog from 'store/errLog';// error log组件
2223
import './mock/index.js'; // 该项目所有请求使用mockjs模拟
2324

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+
2429
// register globally
2530
Vue.component('multiselect', Multiselect);
2631
Vue.component('Sticky', Sticky);
32+
Vue.use(VueI18n);
2733
Vue.use(ElementUI);
34+
2835
Vue.use(vueWaves);
2936

3037
// register global utility filters.
3138
Object.keys(filters).forEach(key => {
3239
Vue.filter(key, filters[key])
3340
});
3441

42+
Vue.config.lang = 'en'
43+
Vue.locale('en', enLocale)
44+
3545
// permissiom judge
3646
function hasPermission(roles, permissionRoles) {
3747
if (roles.indexOf('admin') >= 0) return true; // admin权限 直接通过

0 commit comments

Comments
 (0)