|
|
@@ -8,7 +8,7 @@
|
|
|
<template v-for="(item, index) in state.historyStacks" :key="index">
|
|
|
<li :class="['app-navbar__tab-item', activeName === item.name && 'is-active']"
|
|
|
@click="changeTab(index)">
|
|
|
- <span class="text">{{ item.title }}</span>
|
|
|
+ <span class="text">{{ t('routes.'+item.name) }}</span>
|
|
|
<span class="icon"
|
|
|
v-if="state.historyStacks.length > 1 && (isMobile ? activeName === item.name : true)">
|
|
|
<i class="g-icon--close" @click.stop="removeTab(index)"></i>
|
|
|
@@ -26,7 +26,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { computed, ref, watch } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
-import { useGlobalStore } from '@/stores'
|
|
|
+import { useGlobalStore, i18n } from '@/stores'
|
|
|
import historyRouter from '../../../router/historyRouter'
|
|
|
|
|
|
const { state, removeHistory } = historyRouter;
|
|
|
@@ -44,6 +44,8 @@ const isMobile = computed(() => {
|
|
|
return globalStore.isMobile;
|
|
|
})
|
|
|
|
|
|
+const { global: { t } } = i18n
|
|
|
+
|
|
|
// 选择标签
|
|
|
const changeTab = (index: number) => {
|
|
|
const item = state.historyStacks[index];
|