项目作者: TriDiamond

项目描述 :
A simple cross browser supported vuejs2 scroll fixed header component
高级语言: HTML
项目地址: git://github.com/TriDiamond/vuejs-scroll-fixed-header.git
创建时间: 2019-02-25T05:56:09Z
项目社区:https://github.com/TriDiamond/vuejs-scroll-fixed-header

开源协议:MIT License

下载


Vuejs-scroll-fixed-header Component



Build Status


Github starts


License


Npm downloads


Npm version

一 Vue 2 scroll fixed header component

Demo
📙 中文文档
📙Changelog

Installation

  1. npm i vuejs-scroll-fixed-header -S

Usage

Support

Supported Package Version
Vue 2.5+

Install component and Usage

Import component

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

Vue usage

  1. <template>
  2. <scroll-fixed-header :fixed.sync="fixed" :threshold="56">
  3. <nav class="navbar navbar-light bg-light">
  4. <div class="container">
  5. <a class="navbar-brand" href="#">Vuejs Scroll Fixed Header</a>
  6. </div>
  7. </nav>
  8. </scroll-fixed-header>
  9. </template>
  10. <script>
  11. export default {
  12. name: 'Timer',
  13. data() {
  14. return {
  15. fixed: false,
  16. };
  17. },
  18. };
  19. </script>

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