From 0dd14ddeff4ceedf52d2dd59445139952b7c47bc Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:01:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=85=88=E5=90=8E=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98=20(#2680?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #2674 --- frontend/src/views/app-store/apps/index.vue | 3 ++- frontend/src/views/app-store/installed/index.vue | 3 ++- frontend/src/views/container/compose/detail/index.vue | 1 + frontend/src/views/database/mysql/index.vue | 2 +- frontend/src/views/website/website/index.vue | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/app-store/apps/index.vue b/frontend/src/views/app-store/apps/index.vue index 36aa8f48b..8d31b696a 100644 --- a/frontend/src/views/app-store/apps/index.vue +++ b/frontend/src/views/app-store/apps/index.vue @@ -192,7 +192,7 @@ const language = useI18n().locale.value; const paginationConfig = reactive({ cacheSizeKey: 'app-page-size', currentPage: 1, - pageSize: 60, + pageSize: Number(localStorage.getItem('app-page-size')) || 60, total: 0, }); @@ -219,6 +219,7 @@ const search = async (req: App.AppReq) => { loading.value = true; req.pageSize = paginationConfig.pageSize; req.page = paginationConfig.currentPage; + localStorage.setItem('app-page-size', req.pageSize + ''); await SearchApp(req) .then((res) => { apps.value = res.data.items; diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue index 587767215..4c37555c3 100644 --- a/frontend/src/views/app-store/installed/index.vue +++ b/frontend/src/views/app-store/installed/index.vue @@ -337,7 +337,7 @@ let timer: NodeJS.Timer | null = null; const paginationConfig = reactive({ cacheSizeKey: 'app-installed-page-size', currentPage: 1, - pageSize: 20, + pageSize: Number(localStorage.getItem('app-installed-page-size')) || 20, total: 0, }); const open = ref(false); @@ -415,6 +415,7 @@ const search = () => { loading.value = true; searchReq.page = paginationConfig.currentPage; searchReq.pageSize = paginationConfig.pageSize; + localStorage.setItem('app-installed', searchReq.pageSize + ''); SearchAppInstalled(searchReq) .then((res) => { data.value = res.data.items; diff --git a/frontend/src/views/container/compose/detail/index.vue b/frontend/src/views/container/compose/detail/index.vue index c0aad5217..e2705f945 100644 --- a/frontend/src/views/container/compose/detail/index.vue +++ b/frontend/src/views/container/compose/detail/index.vue @@ -166,6 +166,7 @@ const search = async () => { let filterItem = filters.value; let params = { name: '', + state: 'all', page: paginationConfig.currentPage, pageSize: paginationConfig.pageSize, filters: filterItem, diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index 29398d98b..b883cce77 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -269,7 +269,7 @@ const data = ref(); const paginationConfig = reactive({ cacheSizeKey: 'mysql-page-size', currentPage: 1, - pageSize: 10, + pageSize: Number(localStorage.getItem('mysql-page-size')) || 10, total: 0, orderBy: 'created_at', order: 'null', diff --git a/frontend/src/views/website/website/index.vue b/frontend/src/views/website/website/index.vue index ecb329b22..ac6d11f39 100644 --- a/frontend/src/views/website/website/index.vue +++ b/frontend/src/views/website/website/index.vue @@ -248,7 +248,7 @@ let groups = ref([]); const paginationConfig = reactive({ cacheSizeKey: 'website-page-size', currentPage: 1, - pageSize: 10, + pageSize: Number(localStorage.getItem('website-page-size')) || 10, total: 0, }); let req = reactive({