fix: ui conflicts in update of multiple evalute result
This commit is contained in:
@@ -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)}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user