diff --git a/src/views/list.vue b/src/views/list.vue
index 0e2ca2229..e7b536675 100644
--- a/src/views/list.vue
+++ b/src/views/list.vue
@@ -18,6 +18,7 @@
+ 加载更多
@@ -216,6 +217,7 @@ import { computed } from 'vue';
}
])
const loading = ref(false)
+ const pageToken = ref()
const getFileList = () => {
loading.value = true
http.get('https://api-drive.mypikpak.com/drive/v1/files', {
@@ -223,6 +225,7 @@ import { computed } from 'vue';
parent_id: route.params.id,
thumbnail_size: 'SIZE_LARGE',
with_audit: true,
+ page_token: pageToken.value || undefined,
filters: {
"phase": {"eq": "PHASE_TYPE_COMPLETE"},
"trashed":{"eq":false}
@@ -231,7 +234,11 @@ import { computed } from 'vue';
})
.then((res:any) => {
const {data} = res
- filesList.value = data.files
+ if(!pageToken.value) {
+ filesList.value = []
+ }
+ filesList.value = filesList.value.concat(data.files)
+ pageToken.value = data.next_page_token
})
.finally(() => {
loading.value = false