Explorar o código

企业菜单双语

Xiao_123 hai 11 meses
pai
achega
e418c9eb1a
Modificáronse 2 ficheiros con 8 adicións e 5 borrados
  1. 4 3
      src/layout/company/side.vue
  2. 4 2
      src/router/modules/enterprise.js

+ 4 - 3
src/layout/company/side.vue

@@ -11,7 +11,7 @@
             :to="item.path"
             rounded="shaped"
             :prepend-icon="item.icon"
-            :title="item.title"
+            :title="getCurrentLocaleLang() === 'zh_CN' ? item.title : item.enName"
           >
           </v-list-item>
         </template>
@@ -23,7 +23,7 @@
           :prepend-icon="item.icon"
         >
           <template v-slot:activator="{ props }">
-            <v-list-item v-bind="props" :title="item.title"></v-list-item>
+            <v-list-item v-bind="props" :title="getCurrentLocaleLang() === 'zh_CN' ? item.title : item.enName"></v-list-item>
           </template>
           <v-list-item
             v-for="(val, i) in item.children"
@@ -32,7 +32,7 @@
             :href="val.path"
             style="padding-left: 40px;"
             :to="val.path"
-            :title="val.title"
+            :title="getCurrentLocaleLang() === 'zh_CN' ? val.title : val.enName"
             rounded="shaped"
             :value="val.path"
           ></v-list-item>
@@ -45,6 +45,7 @@
 <script setup>
 defineOptions({ name: 'enterprise-side'})
 import { computed } from 'vue'
+import { getCurrentLocaleLang } from '@/utils/lang.js'
 import enterpriseRoute from '@/router/modules/enterprise'
 
 const list = computed(() => {

+ 4 - 2
src/router/modules/enterprise.js

@@ -47,7 +47,8 @@ const enterprise = [
       {
         path: '/enterprise/statistics/overallAnalysis',
         meta: {
-          title: '整体分析'
+          title: '整体分析',
+          enName: 'Overall analysis'
         },
         component: () => import('@/views/enterprise/statistics/overallAnalysis.vue')
       }
@@ -66,7 +67,8 @@ const enterprise = [
       {
         path: '/enterprise/position',
         meta: {
-          title: '职位列表'
+          title: '职位列表',
+          enName: 'Job list'
         },
         component: () => import('@/views/enterprise/positionManagement/index.vue')
       },