From f80251884e222c31c23a32c260240457c197af1e Mon Sep 17 00:00:00 2001 From: xins Date: Fri, 25 Aug 2023 12:07:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=A5=E4=BE=9D=E5=BE=AE=E6=9C=8D=E5=8A=A11.?= =?UTF-8?q?03=E7=89=88=E6=9C=AC=201=E3=80=81=E6=95=B0=E6=8D=AE=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E6=94=AF=E6=8C=81=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=8C?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E4=B8=AD=E6=9C=89=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 13c6cf2..c8b8883 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -38,6 +38,9 @@ import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' +import i18n from './lang' + + // 全局方法挂载 Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey @@ -73,7 +76,8 @@ DictData.install() */ Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size + size: Cookies.get('size') || 'medium', // set element-ui default size + i18n: (key, value) => i18n.t(key, value) }) Vue.config.productionTip = false @@ -82,5 +86,6 @@ new Vue({ el: '#app', router, store, - render: h => h(App) + render: h => h(App), + i18n })