vue-simple-sticky
1.0.1 • Public • Published
-
top :
Number String
, 可选,可识别['','px','rem','em']单位,无单位默认px
-
cancelSticky :
Boolean
, 可选,默认false,为 true 时取消Sticky组件功能。
<template>
<div>
<sticky>
<div style="width:100%;height:40px;background-color:gray"></div>
</sticky>
<div style="width:100%;height:100px;background-color:blue"></div>
<sticky top='40px'>
<div style="width:100%;height:40px;background-color:green"></div>
</sticky>
<div style="width:100%;height:1000px;background-color:red"></div>
</div>
</template>
<script>
import sticky from '../src/index';
export default {
name: 'demo',
components: {
'sticky': sticky,
},
};
</script>
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# Packed File
npm run build
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads