diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue index dd7a573c..7c125789 100644 --- a/src/views/dashboard/List.vue +++ b/src/views/dashboard/List.vue @@ -378,7 +378,10 @@ function searchDashboards(pageIndex?: any) { const arr = list.filter((d: { name: string }) => d.name.includes(searchText.value) ); - dashboards.value = arr.splice(pageIndex || 0, pageSize); + dashboards.value = arr.splice( + (pageIndex - 1 || 0) * pageSize, + pageSize * (pageIndex || 1) + ); } function reloadTemplates() { diff --git a/src/views/dashboard/graphs/EndpointList.vue b/src/views/dashboard/graphs/EndpointList.vue index 6805c88a..310cc08d 100644 --- a/src/views/dashboard/graphs/EndpointList.vue +++ b/src/views/dashboard/graphs/EndpointList.vue @@ -174,7 +174,10 @@ function clickEndpoint(scope: any) { ); } function changePage(pageIndex: number) { - endpoints.value = searchEndpoints.value.splice(pageIndex - 1, pageSize); + endpoints.value = searchEndpoints.value.splice( + (pageIndex - 1 || 0) * pageSize, + pageSize * (pageIndex || 1) + ); } function searchList() { const currentEndpoints = selectorStore.pods.filter((d: { label: string }) => diff --git a/src/views/dashboard/graphs/InstanceList.vue b/src/views/dashboard/graphs/InstanceList.vue index 0824cd82..1f4152b8 100644 --- a/src/views/dashboard/graphs/InstanceList.vue +++ b/src/views/dashboard/graphs/InstanceList.vue @@ -180,7 +180,10 @@ function clickInstance(scope: any) { } function changePage(pageIndex: number) { - instances.value = searchInstances.value.splice(pageIndex - 1, pageSize); + instances.value = searchInstances.value.splice( + (pageIndex - 1 || 0) * pageSize, + pageSize * (pageIndex || 1) + ); } function searchList() { diff --git a/src/views/dashboard/graphs/ServiceList.vue b/src/views/dashboard/graphs/ServiceList.vue index efd513a6..56a5a4fc 100644 --- a/src/views/dashboard/graphs/ServiceList.vue +++ b/src/views/dashboard/graphs/ServiceList.vue @@ -226,7 +226,10 @@ function objectSpanMethod(param: any): any { } } function changePage(pageIndex: number) { - services.value = selectorStore.services.splice(pageIndex - 1, pageSize); + services.value = services.value.splice( + (pageIndex - 1 || 0) * pageSize, + pageSize * (pageIndex || 1) + ); } function searchList() { searchServices.value = selectorStore.services.filter((d: { label: string }) =>