Vue.use(Sticky) // or for a single instance import Sticky from 'vue-sticky-directive' new Vue({ directives: {Sticky} }) Usage Usev-stickydirective to enable element postion sticky, and usesticky-*attributes to define its options. Sticky element will find its nearest element withsticky-contai...
importVueStickyDirectivefrom'@renatodeleao/vue-sticky-directive'exportdefault{name:"your-component-name",/*** You can use alternative namespace instead of "sticky" here*/directives:{"sticky":VueStickyDirective}} Recommended Markup <!--sticky container (optional) --><!-- the actual sticky elemen...
Package vue3-sticky-directive failed to load. There might be a problem with your internet connection. Try refreshing the page a few times. If the problem persists, file an issue onGitHub.
npm install vue-sticky-directive-ts --save Using yarn: yarn add vue-sticky-directive-ts ES2015 // register globallyimportStickyfrom'vue-sticky-directive-ts'Vue.use(Sticky) Usage Usev-stickydirective to enable element postion sticky. Sticky element will find its nearest element withsticky-container...
import Sticky from 'vue-sticky-directive-io' // 全局使用 Vue.use(Sticky) // 局部使用 new Vue({ directives: {Sticky} }) Html getAttribute选项 sticky-offset(string)- 设置偏移值, 可以是组件内部data中配置对象的key。也可以是string描述的键值对配置对象 例如 sticky-offset="{top: 10, bottom: 20...