chore: logs style

This commit is contained in:
jialin
2024-10-20 10:40:17 +08:00
parent 386f2969eb
commit d6fd498489
7 changed files with 369 additions and 205 deletions
+18 -3
View File
@@ -59,9 +59,24 @@ export default function useOverlayScroller(options?: any) {
[scrollEventElement, instanceRef]
);
const throttledUpdateScrollerPosition = React.useCallback(() => {
throttledScroll();
}, [throttledScroll]);
const scrollauto = React.useCallback(() => {
scrollEventElement.current?.scrollTo?.({
top: scrollEventElement.current.scrollHeight,
behavior: 'auto'
});
instanceRef.current?.update?.();
}, [scrollEventElement, instanceRef]);
const throttledUpdateScrollerPosition = React.useCallback(
(delay?: number) => {
if (delay === 0) {
scrollauto();
} else {
throttledScroll();
}
},
[throttledScroll, scrollauto]
);
// const createInstance = React.useCallback((el: any) => {
// if (el) {