Vue2 scroll fixed header component
npm install vuejs-scroll-fixed-header> 一 Vue 2 scroll fixed header component
``bash`
npm i vuejs-scroll-fixed-header -S
| Supported Package | Version |
| ----------------- | ------- |
| Vue | 2.5+ |
Import component
`es6`
// global register at main.js
import ScrollFixedHeader from 'vuejs-scroll-fixed-header';
Vue.use(ScrollFixedHeader);
Vue usage
`vue
`
| Name | Type | Default | Description |
| --------- | ------- | ------- | --------------------------------------------------------- |
| fixed | Boolean | false | The fixed status of the current header |0` | The scroll top threshold for determining the fixed status |
| threshold | Number |
MIT License
Copyright (c) 2019 TriDiamond