Browse Source

导航跳转

natasha 1 year ago
parent
commit
a3eb7dc74b
1 changed files with 23 additions and 5 deletions
  1. 23 5
      src/components/inputModules/common/Nav.vue

+ 23 - 5
src/components/inputModules/common/Nav.vue

@@ -2,8 +2,8 @@
 <template>
   <div class="nav">
     <div class="nav-list">
-      <span :style="{ cursor: 'pointer' }" @click="$router.push('/')"
-        >教材管理</span
+      <span :style="{ cursor: 'pointer' }" @click="handleClickLink"
+        >{{invok_module?$t("GCLS-LC"):'教材管理'}}</span
       >
       <span class="nav-list-line">/</span>
       <span>{{ navValue }}</span>
@@ -12,18 +12,36 @@
 </template>
 
 <script>
+import { updateWordPack } from "@/utils/i18n";
 export default {
   components: {},
   props: ["navValue"],
   data() {
-    return {};
+    return {
+        invok_module: this.$route.query.invok_module?this.$route.query.invok_module:''
+    };
   },
   computed: {},
   watch: {},
   //方法集合
-  methods: {},
+  methods: {
+    // 处理跳转
+    handleClickLink(){
+        if(this.invok_module){
+            window.location.href="/GCLS-LC/"
+        }else{
+            this.$router.push('/')
+        }
+    }
+  },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  async created() {
+    await updateWordPack({
+      word_key_list: [
+        "GCLS-LC"
+      ],
+    });
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前