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
- Host: GitHub
- URL: https://github.com/bennyxguo/vuejs-scroll-fixed-header
- Owner: bennyxguo
- License: mit
- Created: 2019-02-25T05:56:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-28T02:57:43.000Z (11 months ago)
- Last Synced: 2025-03-27T14:05:34.645Z (4 months ago)
- Topics: fixed-header, scroll-fixed-header, vue-component, vuejs2
- Language: HTML
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Vuejs-scroll-fixed-header Component
> 一 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