Skip to content

Commit

Permalink
fix(i18n): 修复用户中心词条不生效的问题 (#634) (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
timi137137 authored Nov 15, 2023
1 parent 93b3492 commit 53fb48b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
20 changes: 9 additions & 11 deletions src/pages/user/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { t } from '@/locales';

export interface UserInfoListType {
title: string;
content: string;
Expand All @@ -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,
},
Expand Down
6 changes: 3 additions & 3 deletions src/pages/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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';
Expand All @@ -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(
Expand Down

0 comments on commit 53fb48b

Please sign in to comment.