chore: model file description
This commit is contained in:
@@ -65,8 +65,8 @@ const LogsList: React.FC<LogsListProps> = forwardRef((props, ref) => {
|
||||
const clientHeight = scrollEventElement?.clientHeight;
|
||||
|
||||
stopScroll.current = scrollTop + clientHeight <= scrollHeight;
|
||||
// is scroll to bottom
|
||||
const isBottom = scrollTop + clientHeight === scrollHeight;
|
||||
|
||||
const isBottom = scrollTop + clientHeight + 150 >= scrollHeight;
|
||||
// is scroll to top
|
||||
if (scrollTop === 0) {
|
||||
onScroll?.({
|
||||
|
||||
@@ -215,7 +215,7 @@ const LogsViewer: React.FC<LogsViewerProps> = forwardRef((props, ref) => {
|
||||
);
|
||||
|
||||
const debouncedScroll = useCallback(
|
||||
_.debounce(() => {
|
||||
_.throttle(() => {
|
||||
if (scrollPos[0] === 'top' && scrollPosRef.current.pos === 'top') {
|
||||
logListRef.current?.scrollToTop();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import { Typography } from 'antd';
|
||||
import React from 'react';
|
||||
|
||||
interface TooltipListProps {
|
||||
list: { title: React.ReactNode; tips: React.ReactNode }[];
|
||||
}
|
||||
|
||||
const TooltipList: React.FC<TooltipListProps> = (props) => {
|
||||
const { list } = props;
|
||||
return (
|
||||
<ul className="tips-desc-list">
|
||||
{list.map((item, index: number) => {
|
||||
return (
|
||||
<li className="m-b-8" key={index}>
|
||||
<Typography.Title
|
||||
level={5}
|
||||
style={{
|
||||
color: 'var(--color-white-1)',
|
||||
marginRight: 10,
|
||||
marginBottom: 0
|
||||
}}
|
||||
>
|
||||
{item.title}:
|
||||
</Typography.Title>
|
||||
<Typography.Text
|
||||
style={{
|
||||
color: 'var(--color-white-1)',
|
||||
display: 'inline-flex',
|
||||
lineHeight: 1.5
|
||||
}}
|
||||
>
|
||||
{item.tips}
|
||||
</Typography.Text>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
);
|
||||
};
|
||||
|
||||
export default TooltipList;
|
||||
Reference in New Issue
Block a user