lock scrolling Element when you open a popup
usage
import ScrollLocker from './lib/index.js';
const locker = new ScrollLocker();
// lock scrolling Element
locker.lock();
// release scrolling Element
locker.release();
解决滚动穿透问题
代码来自有赞UI库
import ScrollLocker from './lib/index.js';
const locker = new ScrollLocker();
// lock scrolling Element
locker.lock();
// release scrolling Element
locker.release();
代码来自有赞UI库
npm i @redbuck/scroll-locker
0
1.0.3
ISC
114 kB
10