# vue-antiscroll-addon

> A Vue Antiscroll addon

Latest version **2.1.4** (published 2018-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-antiscroll-addon
pnpm add vue-antiscroll-addon
yarn add vue-antiscroll-addon
bun add vue-antiscroll-addon
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.4 |
| Published | 2018-04-27 |
| First published | 2018-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 48.4 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | evox |
| Maintainers | evox34 |

## Links

- npm: https://www.npmjs.com/package/vue-antiscroll-addon
- Homepage: https://github.com/evo34/vue-antiscroll-addon
- Issues: https://github.com/evo34/vue-antiscroll-addon/issues
- npm.io page: https://npm.io/package/vue-antiscroll-addon

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.3.3
- [css-element-queries](https://npm.io/package/css-element-queries.md) ^1.0.1

## Recent versions

- 2.1.4 (latest) — 2018-04-27
- 2.1.3 — 2018-04-24
- 2.1.2 — 2018-04-24
- 2.1.1 — 2018-04-10
- 2.1.0 — 2018-03-07
- 2.0.8 — 2018-03-07
- 2.0.7 — 2018-03-06
- 2.0.6 — 2018-03-06
- 2.0.5 — 2018-03-05
- 2.0.4 — 2018-03-05
- 2.0.3 — 2018-03-04
- 2.0.1 — 2018-03-04
- 2.0.0 — 2018-03-04

## README

# Vue-Antiscroll-Addon


## Features
+ package the [antiscroll](https://github.com/Automattic/antiscroll "antiscroll") use vue component
+ enhance it with [css-element-queries](https://github.com/marcj/css-element-queries "css-element-queries")
+ perfectly unified native scroll bar

## Support

Support Vue.js 2.0+


## Install

```javascript
npm install vue-antiscroll-addon
```

## Useage
```javascript
// in entry file
import Vue from 'vue'
import vueAntiscroll from 'vue-antiscroll-addon'
Vue.component('vueAntiscroll', vueAntiscroll)
```

### Example
```html
<VueAntiscroll class="el-menu__wrapper width-100" :height="menuBoxHeight">
    // content
</VueAntiscroll>
```

## Props

| Name    | Type    | Description   |  Optional value | Default |
| ------------- |-------| -----| ----| -------|
| height |int|the container height| —|—|
| width |int|the container width| —|—|
| scrolling |function|on scroll callback —|—|
| scrollToBottom |function|on scrollToBottom called up| —|—|
| initialDisplay |boolean|Whether to display when initialized scrollbar| —|—|
| barClass |string|auto add when initialized scrollbar| —|—|
| transitionTarget |string|css selector(When your scroll toggle display in an transition element, you may provide **transitionTarget**, then the scroll will auto **refresh()** after **transitionend** event )| eg: '.abc'|—|
## Api
1. scrollTo

```javascript
   <VueAntiscroll ref="antiscroll" class="el-menu__wrapper width-100" :height="menuBoxHeight">
       // content
   </VueAntiscroll>
   // paramter
   // bottom, top, left, right
   this.$refs.antiscroll.scrollTo('bottom')
```
2. refresh
```javascript
   <VueAntiscroll ref="antiscroll" class="el-menu__wrapper width-100" :height="menuBoxHeight">
       // content
    </VueAntiscroll>
    //You may need it when the display is switched
    this.$refs.antiscroll.refresh()
```
## Compatibility

PC: IE9+

## LICENSE

MIT

---
_Source: https://npm.io/package/vue-antiscroll-addon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
