You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue' import App from './App' import router from './router' import store from './store' import '../node_modules/normalize.css/normalize.css' // 重置样式表
import ElementUI from 'element-ui' import './styles/index.scss' import './styles/theme/index.css' import './assets/font_icon/iconfont.css' // require styles 引入样式
import 'quill/dist/quill.core.css' import 'quill/dist/quill.snow.css' import 'quill/dist/quill.bubble.css' // import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
import VueI18n from "vue-i18n" Vue.use( VueI18n)
//引入element-ui语言
import elementEnLocale from 'element-ui/lib/locale/lang/en' import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'
const messages = { "en":{ ... require('./locales/en.json'), ...elementEnLocale
}, "zh":{ ... require('./locales/zh-CN.json'), ...elementZhLocale
} } const i18n = new VueI18n({ locale: localStorage.getItem("language") || 'zh',//指定默认语言
messages, }) Vue.use(ElementUI, { i18n: (key, value) => i18n.t(key, value) }) window.i18n = i18n;
Vue.prototype.$message = ElementUI.Message
// 阻止启动生产消息
Vue.config.productionTip = false
/* eslint-disable no-new */ new Vue({ el: '#canvas', router, store, components: { App }, i18n, template: '<App/>' })
|