https://github.com/xty1992a/scroll-locker
https://github.com/xty1992a/scroll-locker
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/xty1992a/scroll-locker
- Owner: xty1992a
- Created: 2019-07-30T06:20:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T05:46:27.000Z (about 2 years ago)
- Last Synced: 2025-02-02T18:47:31.783Z (19 days ago)
- Language: JavaScript
- Size: 237 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### lock scrolling Element when you open a popup
### usage
```javascript
import ScrollLocker from './lib/index.js';const locker = new ScrollLocker();
// lock scrolling Element
locker.lock();
// release scrolling Element
locker.release();
```### 解决滚动穿透问题
代码来自[有赞UI库](https://github.com/youzan/vant/blob/dev/src/mixins/popup/index.js)