From c81761d310acb5b056de8ca3bfa8a8fba2e24019 Mon Sep 17 00:00:00 2001 From: ai-qing-hai Date: Tue, 14 Nov 2023 17:10:17 +0800 Subject: [PATCH] feat(detail): update Antv home update dumi-theme-antv -3 --- site/components/FamousPersons/index.module.less | 6 ++++-- site/components/FamousPersons/index.tsx | 15 +++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/site/components/FamousPersons/index.module.less b/site/components/FamousPersons/index.module.less index c9d96ebd..e9fa1876 100644 --- a/site/components/FamousPersons/index.module.less +++ b/site/components/FamousPersons/index.module.less @@ -20,8 +20,10 @@ &:extend(.commonFlexConfig); flex-direction: column; justify-content: space-between; - height: calc(1680px - 100vw + 377px ); - width: calc((100vw - 396px)/ 4); + height: calc((1680px - 100vw) / 10 + 377px); + max-height: 377px; + min-height: 350px; + width: calc((100vw - 380px - 84px)/ 4); min-width: 239px; max-width: 399px; padding: 29px 20px 20px; diff --git a/site/components/FamousPersons/index.tsx b/site/components/FamousPersons/index.tsx index a6de35fc..fadf4b26 100644 --- a/site/components/FamousPersons/index.tsx +++ b/site/components/FamousPersons/index.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { useIntl } from 'dumi'; +import classNames from 'classnames'; +import { useIntl, useLocale } from 'dumi'; import { ModuleTitle as Title, OverflowedText } from '../common'; import FAMOUS_PERSONS_DATAS from '../../data/famous-persons.json'; @@ -7,15 +8,21 @@ import styles from './index.module.less'; // 专家之声 export function FamousPersons() { - const intl = useIntl() + const locale = useLocale(); + + const language: 'zh' | 'en' = locale.id.includes('zh') ? 'zh' : 'en'; + + const intl = useIntl(); const useT = (transformedMessage: string) => { return intl.formatMessage({ - id: transformedMessage + id: transformedMessage, }); }; return ( -
+
<div className={styles.famousAuctions} > {