Преглед на файлове

JLHWEB: 1、修复标签页显示undefined问题;
2、修复第一次进入网站显示英文问题

JohnnyChan преди 3 дни
родител
ревизия
2e93720574
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      JLHWEB/index.html
  2. 1 1
      JLHWEB/src/routers/index.ts
  3. 1 1
      JLHWEB/src/stores/modules/global.ts

+ 1 - 1
JLHWEB/index.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="zh">
   <head>
     <meta charset="UTF-8" />
     <link rel="icon" href="/favicon.ico" />

+ 1 - 1
JLHWEB/src/routers/index.ts

@@ -44,7 +44,6 @@ router.beforeEach(async (to, from, next) => {
   const keepAliveStore = useKeepAliveStore();
   const { keepAliveName } = storeToRefs(keepAliveStore);
 
-  keepAliveStore.computedKeepAliveName(to, from);
   console.log("keepAliveName :>> ", keepAliveName);
   console.log("to :>> ", to);
   console.log("from :>> ", from);
@@ -94,6 +93,7 @@ router.beforeEach(async (to, from, next) => {
 
   // 9.正常访问页面
   next();
+  keepAliveStore.computedKeepAliveName(to, from);
 });
 
 /**

+ 1 - 1
JLHWEB/src/stores/modules/global.ts

@@ -13,7 +13,7 @@ export const useGlobalStore = defineStore({
     // element 组件大小
     assemblySize: "small",
     // 当前系统语言
-    language: null,
+    language: "zh-cn",
     // 当前页面是否全屏
     maximize: false,
     // 主题颜色