处理ios兼容性问题

This commit is contained in:
2025-01-17 10:08:06 +08:00
parent 08e4f8ae6e
commit 8553c5f2b7
7 changed files with 22 additions and 14 deletions

View File

@@ -322,7 +322,7 @@
scrollTop: 0,
items: [],
scrollHeight: 0,
height: 400
height: 300
})
const refXuanjiList = ref(null)
@@ -334,8 +334,10 @@
const height = 44
const marginBottom = 10
const oneItemHeight = height + marginBottom
xuanjiData.scrollTop = Math.ceil((nowIndex.value + 1) / 3) * oneItemHeight - (xuanjiData.height) / 2 +
const scrollTop= Math.ceil((nowIndex.value + 1) / 3) * oneItemHeight - (xuanjiData.height) / 2 +
oneItemHeight / 2
console.log(scrollTop);
xuanjiData.scrollTop =scrollTop<0?0:scrollTop
return
// #endif