处理ios兼容性问题
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user