phegman / v-scroll-lock Goto Github PK
View Code? Open in Web Editor NEWA Vue.js directive for body scroll locking without breaking scrolling of a target element.
License: Apache License 2.0
A Vue.js directive for body scroll locking without breaking scrolling of a target element.
License: Apache License 2.0
Its impossible to use this seamlessly with typescript since you can't use a version without the js body-scroll-lock dependency.
Hey,
This library is licensed as GPL-3 and is being used in chakra-ui/vue. Unfortunately, this blocks us from using chakra ui in a commercial product.
Would you consider changing the license to something more permitting? ๐
Apache-2.0 works well for us, MIT would too.
So I installed as you install vue 3 plugins:
main.js:
import VScrollLock from 'v-scroll-lock'
app.use(VScrollLock)
and in the app
<div v-scroll-lock="true">
but nothing happens, the body is still scrollable. It fails silently, so no errors or anything.
My application is not a Cordova project but a Vue-CLI3 project, header and footer are locked (no elastic effects anymore), the main content between header and footer is scrolling. On iOS 12 the main content shows a scrollbar but it does not scroll...
On Android it works okay.
There could be a solution overhere: FL3NKEY/scroll-lock#1
I tried to integrate it with Nuxt but apparently, it's not SSR compatible.
Could it be modified to work with Nuxt?
Thanks
I haven't tested with other versions, but it scrolls on this version for sure. Perhaps related to #1?
I am not quite sure how to apply this option with this directive. Hence, I am currently having to just use body-scroll-lock directly
The v-scroll-lock
package does not provide its own TypeScript definitions, and none are available from DefinitelyTyped.
The only way to use this package with TypeScript at the moment is by using a shim .d.ts file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.