quasar
Version:
Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
18 lines (15 loc) • 343 B
JavaScript
import preventScroll from '../../utils/scroll/prevent-scroll.js'
export default function () {
let currentState
return {
preventBodyScroll (state) {
if (
state !== currentState
&& (currentState !== void 0 || state === true)
) {
currentState = state
preventScroll(state)
}
}
}
}