diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index d24574c..4ff7e28 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -322,17 +322,20 @@ async function loadMore() { // listData.value.push(...more) if (pagination.pageNo == 1) { listData.value = [] + listData.value = listData.value.concat(more) + console.log('listData.value出来了', listData.value) + waterfallRef.value?.resize() } else { - setTimeout(() => { - const height = document.getElementsByClassName('vue-waterfall-column')[0].style.height - 300 - console.log('listData.value出来了height', document.getElementById('vueWaterfall').style.height) - el.value?.scrollTo({ top: height, behavior: 'smooth' }) - }, 50) + // setTimeout(() => { + // const height = el.value?.scrollHeight - 1000 + // console.log('listData.value出来了height', height) + // el.value?.scrollTo({ top: height, behavior: 'smooth' }) + // }, 50) + listData.value = listData.value.concat(more) + console.log('listData.value出来了', listData.value) + waterfallRef.value?.mix() } - listData.value = listData.value.concat(more) - waterfallRef.value?.resize() - console.log('listData.value出来了', listData.value) } const gridHeight = computed(() => {