From 53fb48b7a79f5296e46279542f4adbe85d1e4b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Wed, 15 Nov 2023 22:52:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20=E4=BF=AE=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=AD=E5=BF=83=E8=AF=8D=E6=9D=A1=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98=20(#634)=20(#636)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/user/constants.ts | 20 +++++++++----------- src/pages/user/index.vue | 6 +++--- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/pages/user/constants.ts b/src/pages/user/constants.ts index 38dab68..74f03ad 100644 --- a/src/pages/user/constants.ts +++ b/src/pages/user/constants.ts @@ -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 = [ { - 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, }, diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue index 6f20c42..efee832 100644 --- a/src/pages/user/index.vue +++ b/src/pages/user/index.vue @@ -16,9 +16,9 @@ - +
- {{ item.title }} + {{ t(item.title) }}
{{ 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(