template模块代码
固定栏
@click="onClick"
:sticky="true"
:duration="0"
:swipe-threshold="5"
:offset-top="this.heightall"
class="seckilling-tab"
>
内容{{index}}
js模块代码
export default {
data() {
return {
heightall: 0,
tabs: {
0: '选项0',
1: '选项1',
2: '选项2',
3: '选项3',
4: '选项4'
}
}
},
mounted() {
this.$nextTick(function() {
this.heightall = this.$refs.getheight.offsetHeight
console.log(this.heightall)
})
},
methods: {
onClick(name) {}
}
}
效果
靠谱的彣彣彧彧
发布了1 篇原创文章 · 获赞 0 · 访问量 26
私信
关注
标签:选项,私信,heightall,选项卡,Vant,代码,vue,模块,文章
来源: https://blog.csdn.net/Pgy121/article/details/104411348