diff --git a/src/components/auto-tooltip/title-tip.tsx b/src/components/auto-tooltip/title-tip.tsx index 272a7e04..b267f05d 100644 --- a/src/components/auto-tooltip/title-tip.tsx +++ b/src/components/auto-tooltip/title-tip.tsx @@ -23,9 +23,9 @@ const TitleTip: React.FC = (props) => {
{isOverflowing || showTitle ? title || children : ''} diff --git a/src/components/overlay-scroller/index.tsx b/src/components/overlay-scroller/index.tsx index 1ef988a5..48e8bcb1 100644 --- a/src/components/overlay-scroller/index.tsx +++ b/src/components/overlay-scroller/index.tsx @@ -54,18 +54,11 @@ export const TooltipOverlayScroller: React.FC< return ( - {title} - + {title} ) } {...rest} diff --git a/src/components/seal-form/components/label-info.tsx b/src/components/seal-form/components/label-info.tsx index 08c54c37..2ab130f9 100644 --- a/src/components/seal-form/components/label-info.tsx +++ b/src/components/seal-form/components/label-info.tsx @@ -12,42 +12,39 @@ interface NoteInfoProps { const NoteInfo: React.FC = (props) => { const { required, description, label, labelExtra } = props || {}; if (!label) return null; + const renderRequiredStar = required ? ( + + * + + ) : null; + + const renderQuestionIcon = description ? ( + + + + ) : null; + + const labelContent = ( + <> + {label} + {(required || description) && ( + + {renderRequiredStar} + {renderQuestionIcon} + + )} + + ); + return ( {description ? ( - - {label} - - {required && ( - - * - - )} - - - - - + {labelContent} ) : ( - <> - {label} - {required && ( - - - * - - - )} - + labelContent )} {labelExtra} diff --git a/src/components/tooltip-list/index.tsx b/src/components/tooltip-list/index.tsx index c0cad4a8..f9b1a37a 100644 --- a/src/components/tooltip-list/index.tsx +++ b/src/components/tooltip-list/index.tsx @@ -1,7 +1,6 @@ import { useIntl } from '@umijs/max'; import React from 'react'; import styled from 'styled-components'; -import OverlayScroller from '../overlay-scroller'; const UL = styled.ul` list-style: none; @@ -31,25 +30,23 @@ const TooltipList: React.FC = (props) => { const intl = useIntl(); const { list } = props; return ( - -
    - {list.map((item, index: number) => { - return ( -
  • - - {item.title?.locale - ? intl.formatMessage({ id: item.title?.text || '' }) - : item.title} - : - - - {intl.formatMessage({ id: item.tips })} - -
  • - ); - })} -
-
+
    + {list.map((item, index: number) => { + return ( +
  • + + {item.title?.locale + ? intl.formatMessage({ id: item.title?.text || '' }) + : item.title} + : + + + {intl.formatMessage({ id: item.tips })} + +
  • + ); + })} +
); }; diff --git a/src/global.less b/src/global.less index 0d44867b..7a2f05ce 100644 --- a/src/global.less +++ b/src/global.less @@ -827,17 +827,21 @@ body { } } -.ant-tooltip-content { - .ant-tooltip-inner { - width: fit-content; - max-width: 300px; +.ant-tooltip { + max-width: var(--width-tooltip-max); - .text-tertiary { - color: var(--color-white-secondary); - } + .ant-tooltip-content { + .ant-tooltip-inner { + width: fit-content; + max-width: var(--width-tooltip-max); - a { - color: var(--ant-color-link-hover); + .text-tertiary { + color: var(--color-white-secondary); + } + + a { + color: var(--ant-color-link-hover); + } } } } diff --git a/src/pages/llmodels/components/deploy-builtin-modal.tsx b/src/pages/llmodels/components/deploy-builtin-modal.tsx index c8983353..3ae98e7c 100644 --- a/src/pages/llmodels/components/deploy-builtin-modal.tsx +++ b/src/pages/llmodels/components/deploy-builtin-modal.tsx @@ -556,11 +556,7 @@ const AddModal: React.FC = (props) => { showOkBtn={!showExtraButton} extra={ showExtraButton && ( -