diff --git a/src/components/viewPost/vp-overlay-collection.vue b/src/components/viewPost/vp-overlay-collection.vue
index 143bc850..a79d3d7b 100644
--- a/src/components/viewPost/vp-overlay-collection.vue
+++ b/src/components/viewPost/vp-overlay-collection.vue
@@ -6,6 +6,10 @@
合集ID:{{ props.collection.collection_id }}
+
+
+ 加载中...
+
({
set: (v) => emits("update:modelValue", v),
});
watch(
- () => visible.value,
- async (value) => {
- if (value) {
- await new Promise((resolve) => setTimeout(resolve, 500));
+ () => [visible.value, posts.value],
+ async () => {
+ if (visible.value && posts.value.length > 0) {
+ await nextTick();
if (postListEl.value === null || props.collection.total < 5) return;
let topNum: number;
if (props.collection.total - props.collection.cur < 3) topNum = props.collection.total;
else topNum = props.collection.cur - 3;
- postListEl.value.scrollTo({ top: topNum * 69, behavior: "smooth" });
+ postListEl.value.scrollTo({ top: topNum * 87, behavior: "smooth" });
}
},
);
@@ -143,6 +147,16 @@ async function toPost(postId: string, index: number): Promise {
row-gap: 5px;
}
+.tpoc-load {
+ position: relative;
+ display: flex;
+ width: 100%;
+ height: 100px;
+ align-items: center;
+ justify-content: center;
+ column-gap: 5px;
+}
+
.tpoc-item {
display: flex;
flex-direction: column;