1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 13:19:31 +08:00

新增:文章详情页面添加弹幕功能;

修改:修复友链列表单分组显示问题;
优化;对恋爱日记清单列表进行优化
This commit is contained in:
小莫唐尼
2022-12-12 23:03:48 +08:00
parent f12262f4df
commit 9573b303e2
13 changed files with 250 additions and 93 deletions
+10 -4
View File
@@ -20,12 +20,11 @@ export default {
}
},
data() {
return { _scrollTop: 0 };
return { timer: null, _scrollTop: 0 };
},
watch: {
scrollTop(val) {
this._scrollTop = val;
console.log('监听1', val);
this.$forceUpdate();
}
},
@@ -35,11 +34,18 @@ export default {
methods: {
fnScroll() {
throttle(() => {
this.$emit('on-status', false);
const isTop = this._scrollTop >= 180;
this._scrollTop = isTop ? 0 : 999999;
this._scrollTop = isTop ? 0 : 999999999999;
uni.pageScrollTo({
duration: 500,
scrollTop: this._scrollTop
scrollTop: this._scrollTop,
success: () => {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.$emit('on-status', true);
}, 500);
}
});
this.$emit('update:scrollTop', this._scrollTop);
});