vue-sticky-position

A Vue.js sticky position component
2,232 30
Install
npm install vue-sticky-position
Latest Version:2.0.0
Vue:2
Older releases:1
Last Updated:Sep 18, 2018
Links: GitHub  ·  npm
Maintainer: shiye515

vue-sticky-position

vue sticky 定位组件 live demo

NPM version npm download

##简介(Intro)

  • 除了vue之外不依赖其他库,
  • 最新版本仅支持vue2.0,使用vue1.0的请安装1.0的版本
  • 如果浏览器支持 sticky 定位,则使用原生方式,不添加滚动监听

install

vue-sticky-position

npm install vue-sticky-position

用法

    <sticky>
        <div class="stickyed">sticky</div>
    </sticky>
import Sticky from 'vue-sticky-position'
export default {
    components: {
        Sticky
    }
}

API

props

name type default description
top [Number, String] 'auto' 定位时距离顶部的距离,默认保持跟firefox的实现一致
z-ndex Number 10 css中的z-index值

Related Packages

vue-sticky

A directive to sticky element for vue.js.

115,846 161
vue-position-sticky

A Vue.js components to sticky to the page

5,657 11
vue-position-sticky-b

A Vue.js components to sticky to the page

1,506 0
vue-sticky-ssr

A directive to sticky element for vue.js.

1,357 161
vue-affix

A Vue.js plugin that affixes an element in the window while you scroll, similar...

153,389 405

Version History

Version Released Vue License
2.0.0 ^2.1.0
1.0.2 ^1.0.21
1.0.1 ^1.0.21
1.0.0 ^1.0.21