|
@@ -37,7 +37,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import { computed, nextTick, ref, watch } from "vue";
|
|
|
|
|
|
+import { computed, ref, watch } from "vue";
|
|
import { Waterfall } from "vue-waterfall-plugin-next";
|
|
import { Waterfall } from "vue-waterfall-plugin-next";
|
|
import { getBaseURL } from "@dage/service";
|
|
import { getBaseURL } from "@dage/service";
|
|
import { getCollectionListApi, type CollectionListItem } from "@/api";
|
|
import { getCollectionListApi, type CollectionListItem } from "@/api";
|
|
@@ -66,7 +66,7 @@ const bgImg = computed(
|
|
const {
|
|
const {
|
|
pageNum,
|
|
pageNum,
|
|
list: sourceList,
|
|
list: sourceList,
|
|
- noMore,
|
|
|
|
|
|
+ noMore: _noMore,
|
|
loading: fetchLoading,
|
|
loading: fetchLoading,
|
|
getList,
|
|
getList,
|
|
} = usePagination<CollectionListItem>(
|
|
} = usePagination<CollectionListItem>(
|
|
@@ -83,6 +83,7 @@ const {
|
|
);
|
|
);
|
|
|
|
|
|
const loading = computed(() => rendering.value || fetchLoading.value);
|
|
const loading = computed(() => rendering.value || fetchLoading.value);
|
|
|
|
+const noMore = computed(() => !loading.value && _noMore.value);
|
|
|
|
|
|
const onLoad = () => {
|
|
const onLoad = () => {
|
|
// 检查用户是否滚动到页面底部
|
|
// 检查用户是否滚动到页面底部
|
|
@@ -122,9 +123,9 @@ watch(sourceList, async (v) => {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} finally {
|
|
} finally {
|
|
- nextTick(() => {
|
|
|
|
|
|
+ setTimeout(() => {
|
|
rendering.value = false;
|
|
rendering.value = false;
|
|
- });
|
|
|
|
|
|
+ }, 500);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|