From 3c3114985b6106a4bca86a88e67e95a0c384364a Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Mon, 25 Mar 2024 16:27:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BD=93=E8=8E=B7=E5=8F=96=E4=B8=8D?= =?UTF-8?q?=E5=88=B0lang=E7=9A=84=E6=97=B6=E5=80=99=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lms/nladmin-ui/src/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/nladmin-ui/src/main.js b/lms/nladmin-ui/src/main.js index e4e0e81..0d8e1f8 100644 --- a/lms/nladmin-ui/src/main.js +++ b/lms/nladmin-ui/src/main.js @@ -81,7 +81,11 @@ Vue.use(Element, { Vue.prototype.$langPre = { computedProp(suffix) { - return localStorage.getItem('lang') + '_' + suffix + let item = localStorage.getItem('lang'); + if (item === null) { + item = 'zh' + } + return item + '_' + suffix } }