更新国际化支持:调整多个组件中的文本引入,优化语言切换和翻译功能,删除不再使用的类型文件。

This commit is contained in:
jxxghp
2025-04-27 20:49:44 +08:00
parent f809c8e538
commit 0396f180ae
21 changed files with 260 additions and 97 deletions
+10 -5
View File
@@ -1,13 +1,18 @@
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
// 国际化
const { t } = useI18n()
// 已解析的日志列表
const parsedLogs = ref<{ level: string; time: string; program: string; content: string }[]>([])
// 表头
const headers = [
{ title: '级别', value: 'level' },
{ title: '时间', value: 'time' },
{ title: '程序', value: 'program' },
{ title: '内容', value: 'content' },
{ title: t('logging.level'), value: 'level' },
{ title: t('logging.time'), value: 'time' },
{ title: t('logging.program'), value: 'program' },
{ title: t('logging.content'), value: 'content' },
]
// SSE消息对象
@@ -73,7 +78,7 @@ onBeforeUnmount(() => {
</script>
<template>
<LoadingBanner v-if="parsedLogs.length === 0" class="mt-12" text="正在刷新 ..." />
<LoadingBanner v-if="parsedLogs.length === 0" class="mt-12" :text="t('logging.refreshing') + ' ...'" />
<div v-else>
<VTable class="table-rounded" hide-default-footer disable-sort>
<tbody>