chore: model file description

This commit is contained in:
jialin
2025-01-13 15:51:34 +08:00
parent 5c1bcdbd74
commit 9aa297a804
14 changed files with 165 additions and 118 deletions
+2 -2
View File
@@ -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();
}
+41
View File
@@ -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;