import Vue from 'vue'
|
import Element from 'element-ui'
|
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
|
import enLocale from 'element-ui/lib/locale/lang/en'
|
import cssVars from 'css-vars-ponyfill'
|
|
const fontSizeList = ['mini', 'small', 'medium']
|
export default (ctx) => {
|
const size = ctx.$elBusCookie.get('size') || 'small'
|
ctx.store.commit('app/SET_SIZE', size)
|
const locale = {
|
'zh-CN': zhCNLocale,
|
en: enLocale,
|
}
|
const currentLocale = ctx.i18n.getLocaleCookie() || ctx.i18n.defaultLocale
|
ctx.i18n.setLocale(currentLocale)
|
Vue.use(Element, { locale: locale[currentLocale], size })
|
}
|