云
7 小时以前 fb4db4ae9b6a7f113ba049f6789e6916c0dcc276
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(); }