Skip to content

Commit f0ff460

Browse files
committed
initial commit
0 parents  commit f0ff460

File tree

12 files changed

+1623
-0
lines changed

12 files changed

+1623
-0
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Use Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
registry-url: https://registry.npmjs.org/
24+
node-version: lts/*
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Run Build
30+
run: npm run build
31+
32+
- run: npx changelogithub
33+
continue-on-error: true
34+
env:
35+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
36+
37+
- name: Publish
38+
run: npm publish --access public
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
4+
*.log
5+
.DS_Store
6+
.eslintcache

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2025 David Bender (https://github.com/dbzx10299)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Vue Remove Scroll
2+
3+
## Install
4+
5+
```bash
6+
npm i -D vue-remove-scroll
7+
```
8+
9+
## Usage
10+
11+
### Disable scroll
12+
13+
```js
14+
import { useRemoveScroll } from 'vue-remove-scroll'
15+
16+
const { enableScroll, disableScroll } = useRemoveScroll()
17+
```
18+
19+
### Allow scrolling on a certain element
20+
21+
```js
22+
import { useRemoveScroll } from 'vue-remove-scroll'
23+
import { ref } from 'vue'
24+
25+
const modal = ref(null)
26+
27+
const { enableScroll, disableScroll } = useRemoveScroll({
28+
excludedElements: [modal.value]
29+
})
30+
```
31+
32+
## Credits
33+
34+
This project is based on and contains code from:
35+
36+
- [react-remove-scroll](https://github.com/theKashey/react-remove-scroll)
37+
38+
## Licenses
39+
40+
This project is licensed under the [MIT License](https://github.com/rolldown/tsdown/blob/main/LICENSE).

0 commit comments

Comments
 (0)