mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-19 23:06:09 +01:00
7 lines
266 B
TypeScript
7 lines
266 B
TypeScript
export const preventScroll = (protyle: IProtyle, scrollTop = 0, timeout = 1000) => {
|
|
// 防止滚动条滚动后调用 get 请求
|
|
protyle.scroll.lastScrollTop = -1;
|
|
setTimeout(() => {
|
|
protyle.scroll.lastScrollTop = scrollTop;
|
|
}, timeout);
|
|
};
|