Browse Source

修改主页面滚动

hella_online_20240829
lijuncheng 4 months ago
parent
commit
529ed07161
  1. 7
      src/pages/index/index.vue

7
src/pages/index/index.vue

@ -94,6 +94,7 @@
arr: [],
scrollRightTop: 0, // scroll-view
timer: null, //
timerHome: null, //
forcedLogin: false,
count: 1,
position: [-10, -10],
@ -315,14 +316,14 @@
if (this.arr.length == 0) {
await this.getMenuItemTop();
}
if (this.timer) return;
if (this.timerHome) return;
if (!this.menuHeight) {
await this.getElRect('menu-scroll-view', 'menuHeight');
}
setTimeout(() => { //
this.timer = null;
this.timerHome = null;
// scrollHeight
let scrollHeight = e.detail.scrollTop + this.menuHeight / 2;
let scrollHeight = e.detail.scrollTop + this.menuHeight / 5;
for (let i = 0; i < this.arr.length; i++) {
let height1 = this.arr[i];
let height2 = this.arr[i + 1];

Loading…
Cancel
Save