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