fix: ui conflicts in update of multiple evalute result

This commit is contained in:
jialin
2025-06-09 18:45:47 +08:00
parent f73e29937c
commit 5ef733729b
10 changed files with 128 additions and 82 deletions
+9 -3
View File
@@ -3,7 +3,7 @@ import { Typography } from 'antd';
import classNames from 'classnames';
import React from 'react';
import styled from 'styled-components';
import OverlayScroller from '../overlay-scroller';
import OverlayScroller, { OverlayScrollerOptions } from '../overlay-scroller';
import './block.less';
interface AlertInfoProps {
type: Global.MessageType;
@@ -15,6 +15,7 @@ interface AlertInfoProps {
contentStyle?: React.CSSProperties;
title?: React.ReactNode;
maxHeight?: number;
overlayScrollerProps?: OverlayScrollerOptions;
}
const TitleWrapper = styled.div`
@@ -41,7 +42,8 @@ const AlertInfo: React.FC<AlertInfoProps> = (props) => {
title,
contentStyle,
icon,
maxHeight = 86
maxHeight = 86,
overlayScrollerProps = {}
} = props;
return (
@@ -67,7 +69,11 @@ const AlertInfo: React.FC<AlertInfoProps> = (props) => {
{title && (
<TitleWrapper className="title-text">{title}</TitleWrapper>
)}
<OverlayScroller maxHeight={maxHeight} style={{ ...contentStyle }}>
<OverlayScroller
maxHeight={maxHeight}
style={{ ...contentStyle }}
{...overlayScrollerProps}
>
<ContentWrapper
$hasTitle={!!title}
className={classNames('content', type)}
+2 -2
View File
@@ -87,7 +87,7 @@
font-weight: var(--font-weight-bold);
line-height: 1.5;
padding-inline: 6px;
border-bottom: 1px solid var(--ant-color-split);
border: 1px solid var(--ant-color-split);
word-break: break-word;
text-align: left !important;
}
@@ -95,7 +95,7 @@
td {
line-height: 1.5;
padding-inline: 6px;
border-bottom: 1px solid var(--ant-color-split);
border: 1px solid var(--ant-color-split);
word-break: break-word;
text-align: left !important;
}
@@ -12,6 +12,9 @@ const Wrapper = styled.div<{ $maxHeight?: number }>`
width: 100%;
`;
// export OverlayScrollerOptions
export type { OverlayScrollerOptions };
export const OverlayScroller: React.FC<
OverlayScrollerOptions & {
maxHeight?: number;