2
0

fix:仪表盘中英文适配

This commit is contained in:
zhongzm
2025-02-07 09:52:10 +08:00
parent 489d4c8603
commit a8f3e247c6
4 changed files with 104 additions and 37 deletions

View File

@@ -10,8 +10,9 @@ import {
SearchOutlined,
PlusOutlined
} from '@ant-design/icons-vue';
import { getDashboardSiteList } from '@/service/api/auth';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
defineOptions({
name: 'CardData'
@@ -65,27 +66,27 @@ watch([currentPage, pageSize, searchValue], () => {
// 表格列定义
const columns: TableColumnType<Api.DashboardSite>[] = [
{
title: 'NAME',
title: t('page.carddata.sitename'),
key: 'name',
dataIndex: 'name'
},
{
title: 'COUNTRY/REGION',
title: t('page.carddata.country'),
key: 'region',
dataIndex: 'region'
},
{
title: 'ALERTS',
title: t('page.carddata.alert'),
key: 'alerts',
width: 100
},
{
title: 'GATEWAY',
title: t('page.carddata.gateway'),
key: 'gateway',
width: 100
},
{
title: 'SWITCHES',
title: t('page.carddata.switches'),
key: 'switches',
width: 100
},
@@ -100,7 +101,7 @@ const columns: TableColumnType<Api.DashboardSite>[] = [
width: 100
},
{
title: 'CLIENTS',
title: t('page.carddata.clients'),
key: 'clients',
width: 150
},
@@ -146,12 +147,12 @@ const handlePageSizeChange = (size: number) => {
<ACard :bordered="false" size="small" class="card-wrapper">
<div class="flex justify-between items-center mb-16px">
<div class="flex items-center gap-8px">
<span class="text-16px font-medium">Site List</span>
<span class="text-16px font-medium">{{ t('page.carddata.sitelist') }}</span>
</div>
<div class="flex items-center gap-16px">
<AInput
v-model:value="searchValue"
placeholder="Search Site Name"
:placeholder="t('page.carddata.search')"
class="w-240px"
allow-clear
>