|
@@ -132,7 +132,7 @@
|
|
|
:aria-selected="activeKey === 'all'"
|
|
:aria-selected="activeKey === 'all'"
|
|
|
@click="setAll"
|
|
@click="setAll"
|
|
|
>
|
|
>
|
|
|
- <span class="tab-label">全部</span>
|
|
|
|
|
|
|
+ <span class="tab-label">{{ $t("flow.all") }}</span>
|
|
|
</button>
|
|
</button>
|
|
|
<button
|
|
<button
|
|
|
v-for="tab in tabs"
|
|
v-for="tab in tabs"
|
|
@@ -220,6 +220,7 @@ import {
|
|
|
onMounted,
|
|
onMounted,
|
|
|
onBeforeUnmount,
|
|
onBeforeUnmount,
|
|
|
nextTick,
|
|
nextTick,
|
|
|
|
|
+ watch,
|
|
|
} from "vue";
|
|
} from "vue";
|
|
|
import { CountTo } from "vue3-count-to";
|
|
import { CountTo } from "vue3-count-to";
|
|
|
import { Icon } from "@iconify/vue";
|
|
import { Icon } from "@iconify/vue";
|
|
@@ -250,7 +251,7 @@ import { ElLoading, ElMessage } from "element-plus";
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
const themeStore = useThemeStore();
|
|
const themeStore = useThemeStore();
|
|
|
|
|
|
|
|
-const { t } = useI18n();
|
|
|
|
|
|
|
+const { t, locale } = useI18n();
|
|
|
|
|
|
|
|
// 1. 定义 Ref
|
|
// 1. 定义 Ref
|
|
|
const tabsContainerRef = ref(null);
|
|
const tabsContainerRef = ref(null);
|
|
@@ -873,6 +874,11 @@ onMounted(async () => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+watch(locale, async () => {
|
|
|
|
|
+ activeKey.value = "all";
|
|
|
|
|
+ await getAll();
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
// 组件卸载时移除监听,防止内存泄漏
|
|
// 组件卸载时移除监听,防止内存泄漏
|
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
|
if (tabsContainerRef.value) {
|
|
if (tabsContainerRef.value) {
|