<scroll-view scroll-y @scroll="scroll" scroll-with-animation="true"
:scroll-top="scrollTop">
</scroll-view>
data() {
return {
scrollTop: 0,
oldScrollTop: 0,
}
}
scroll(e) {
this.oldScrollTop = e.detail.scrollTop
},
方法
methods: {
this.scrollTop = this.oldScrollTop
this.$nextTick(() => {
this.scrollTop = 0
});
}