An open API service indexing awesome lists of open source software.

https://github.com/bennyxguo/vuejs-scroll-fixed-header

A simple cross browser supported vuejs2 scroll fixed header component
https://github.com/bennyxguo/vuejs-scroll-fixed-header

fixed-header scroll-fixed-header vue-component vuejs2

Last synced: 3 months ago
JSON representation

A simple cross browser supported vuejs2 scroll fixed header component

Awesome Lists containing this project

README

        

# Vuejs-scroll-fixed-header Component



Build Status


Github starts


License


Npm downloads


Npm version

> 一 Vue 2 scroll fixed header component

[Demo](https://tridiamond.github.io/vuejs-scroll-fixed-header/)
[📙 中文文档](https://github.com/TriDiamond/vuejs-scroll-fixed-header/blob/master/README_CN.md)
[📙Changelog](https://github.com/TriDiamond/vuejs-scroll-fixed-header/blob/master/CHANGELOG.md)

## Installation

```bash
npm i vuejs-scroll-fixed-header -S
```

## Usage

### Support

| Supported Package | Version |
| ----------------- | ------- |
| Vue | 2.5+ |

### Install component and Usage

Import component

```es6
// global register at main.js
import ScrollFixedHeader from 'vuejs-scroll-fixed-header';
Vue.use(ScrollFixedHeader);
```

Vue usage

```vue





export default {
name: 'Timer',
data() {
return {
fixed: false,
};
},
};

```

### Props

| Name | Type | Default | Description |
| --------- | ------- | ------- | --------------------------------------------------------- |
| fixed | Boolean | `false` | The fixed status of the current header |
| threshold | Number | `0` | The scroll top threshold for determining the fixed status |

# Liscense

MIT License

Copyright (c) 2019 TriDiamond