shawngo / vue-prevent-parent-scroll

A Vue directive that prevents vertical scrolling outside the current element when top or bottom are reached.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

A Vue directive that prevents vertical scrolling outside the current element when top or bottom are reached.

Installation

npm install --save vue-prevent-parent-scroll

Example

import Vue from 'vue'

Vue.use(require('vue-prevent-parent-scroll'))
<div id="parent">
  <div id="scrollable-child" v-prevent-parent-scroll>
  </div>
</div>

About

A Vue directive that prevents vertical scrolling outside the current element when top or bottom are reached.


Languages

Language:TypeScript 59.0%Language:JavaScript 41.0%