云
3 天以前 be42a59e52e49ba484312517f924286083b9dfd2
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(); }