fix(i18n): 修复用户中心词条不生效的问题 (#634) (#636)

This commit is contained in:
悠静萝莉 2023-11-15 22:52:45 +08:00 committed by GitHub
parent 93b349231e
commit 53fb48b7a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 14 deletions

View File

@ -1,5 +1,3 @@
import { t } from '@/locales';
export interface UserInfoListType {
title: string;
content: string;
@ -8,39 +6,39 @@ export interface UserInfoListType {
export const USER_INFO_LIST: Array<UserInfoListType> = [
{
title: t('pages.user.personalInfo.desc.mobile'),
title: 'pages.user.personalInfo.desc.mobile',
content: '+86 13923734567',
},
{
title: t('pages.user.personalInfo.desc.phone'),
title: 'pages.user.personalInfo.desc.phone',
content: '734567',
},
{
title: t('pages.user.personalInfo.desc.email'),
title: 'pages.user.personalInfo.desc.email',
content: 'Account@qq.com',
},
{
title: t('pages.user.personalInfo.desc.seat'),
title: 'pages.user.personalInfo.desc.seat',
content: 'T32F 012',
},
{
title: t('pages.user.personalInfo.desc.entity'),
title: 'pages.user.personalInfo.desc.entity',
content: '腾讯集团',
},
{
title: t('pages.user.personalInfo.desc.leader'),
title: 'pages.user.personalInfo.desc.leader',
content: 'Michael Wang',
},
{
title: t('pages.user.personalInfo.desc.position'),
title: 'pages.user.personalInfo.desc.position',
content: '高级 UI 设计师',
},
{
title: t('pages.user.personalInfo.desc.joinDay'),
title: 'pages.user.personalInfo.desc.joinDay',
content: '2021-07-01',
},
{
title: t('pages.user.personalInfo.desc.group'),
title: 'pages.user.personalInfo.desc.group',
content: '腾讯/腾讯公司/某事业群/某产品部/某运营中心/商户服务组',
span: 6,
},

View File

@ -16,9 +16,9 @@
</t-button>
</template>
<t-row class="content" justify="space-between">
<t-col v-for="(item, index) in userInfoList" :key="index" class="contract" :span="item.span ?? 3">
<t-col v-for="(item, index) in USER_INFO_LIST" :key="index" class="contract" :span="item.span ?? 3">
<div class="contract-title">
{{ item.title }}
{{ t(item.title) }}
</div>
<div class="contract-detail">
{{ item.content }}
@ -105,6 +105,7 @@ import ProductAIcon from '@/assets/assets-product-1.svg';
import ProductBIcon from '@/assets/assets-product-2.svg';
import ProductCIcon from '@/assets/assets-product-3.svg';
import ProductDIcon from '@/assets/assets-product-4.svg';
import { t } from '@/locales';
import { useSettingStore } from '@/store';
import { changeChartsTheme } from '@/utils/color';
import { LAST_7_DAYS } from '@/utils/date';
@ -118,7 +119,6 @@ let lineContainer: HTMLElement;
let lineChart: echarts.ECharts;
const store = useSettingStore();
const chartColors = computed(() => store.chartColors);
const userInfoList = computed(() => USER_INFO_LIST);
const onLineChange = (value: DateRangeValue) => {
lineChart.setOption(