liu
3 天以前 ee7ac8df8bce38add1f75baf876b49de94b9e00a
1
2
3
4
5
const positions = new Map<string, number>();
const cached = new Set(['/mobile/bags', '/mobile/pallets', '/mobile/batches', '/mobile/stock']);
export function saveMobileScroll(path: string) { if (cached.has(path)) positions.set(path, window.scrollY); }
export function mobileScroll(path: string) { const top=positions.get(path);return top==null?undefined:{left:0,top}; }
export function clearMobileScroll() { positions.clear(); }