fix: tts params filter

This commit is contained in:
jialin
2026-02-11 15:30:35 +08:00
parent e66de732ac
commit 1b8c17ce92
9 changed files with 84 additions and 45 deletions
+25 -28
View File
@@ -62,36 +62,33 @@ const LogsList: React.FC<LogsListProps> = forwardRef((props, ref) => {
scroller: scroller.current
}));
const handleOnWheel = useCallback(
(e: any) => {
const scrollTop = scrollEventElement?.current.scrollTop;
const scrollHeight = scrollEventElement?.current.scrollHeight;
const clientHeight = scrollEventElement?.current.clientHeight;
const handleOnWheel = (e: any) => {
const scrollTop = scrollEventElement?.current?.scrollTop;
const scrollHeight = scrollEventElement?.current?.scrollHeight;
const clientHeight = scrollEventElement?.current?.clientHeight;
stopScroll.current = scrollTop + clientHeight <= scrollHeight;
stopScroll.current = scrollTop + clientHeight <= scrollHeight;
const isBottom = scrollTop + clientHeight + 150 >= scrollHeight;
// is scroll to top
if (scrollTop <= 10) {
onScroll?.({
isTop: true,
isBottom: false
});
} else if (isBottom) {
onScroll?.({
isTop: false,
isBottom: true
});
stopScroll.current = false;
} else {
onScroll?.({
isTop: false,
isBottom: false
});
}
},
[debounceResetStopScroll, scrollEventElement]
);
const isBottom = scrollTop + clientHeight + 150 >= scrollHeight;
// is scroll to top
if (scrollTop <= 10) {
onScroll?.({
isTop: true,
isBottom: false
});
} else if (isBottom) {
onScroll?.({
isTop: false,
isBottom: true
});
stopScroll.current = false;
} else {
onScroll?.({
isTop: false,
isBottom: false
});
}
};
const debounceUpdateScrollerPosition = _.debounce(() => {
generateInstance();