From bb0a5f114a59ffa0354ce4689026f7efa6344b74 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Wed, 12 Jul 2023 14:17:20 +0800 Subject: [PATCH] feat: record the post query conditions in the route query parameters (#4102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area console /kind feature /milestone 2.8.x #### What this PR does / why we need it: 在文章数据管理列表页面路由中记录查询条件,包括分页信息、筛选信息等。可以保证在刷新页面或者从文章编辑页面返回时保留之前的查询状态。 image TODO: - [x] 记录筛选条件,因为路由参数只能使用基本类型,但是原来的筛选条件的变量都是完整对象。 #### Which issue(s) this PR fixes: Fixes #4098 #### Special notes for your reviewer: 需要测试: 1. 文章管理列表的所有筛选项是否可以正常工作。 2. 尝试设置部分筛选,然后刷新页面,观察筛选条件是否正常保留。 #### Does this PR introduce a user-facing change? ```release-note Console 端的文章管理列表支持在地址栏记录筛选条件。 ``` --- console/package.json | 8 +- .../src/components/pagination/Pagination.vue | 113 +++++++++--------- console/pnpm-lock.yaml | 86 ++++++++----- .../src/modules/contents/posts/PostList.vue | 34 +++--- 4 files changed, 135 insertions(+), 106 deletions(-) diff --git a/console/package.json b/console/package.json index 63a6f5d79b..9f511b832f 100644 --- a/console/package.json +++ b/console/package.json @@ -67,10 +67,10 @@ "@uppy/status-bar": "^3.1.2", "@uppy/vue": "^1.0.2", "@uppy/xhr-upload": "^3.2.0", - "@vueuse/components": "^9.6.0", - "@vueuse/core": "^9.6.0", - "@vueuse/router": "^9.6.0", - "@vueuse/shared": "^9.6.0", + "@vueuse/components": "^10.2.0", + "@vueuse/core": "^10.2.0", + "@vueuse/router": "^10.2.0", + "@vueuse/shared": "^10.2.0", "axios": "^0.27.2", "codemirror": "^6.0.1", "colorjs.io": "^0.4.3", diff --git a/console/packages/components/src/components/pagination/Pagination.vue b/console/packages/components/src/components/pagination/Pagination.vue index 5d615aa98d..ce7b9c016f 100644 --- a/console/packages/components/src/components/pagination/Pagination.vue +++ b/console/packages/components/src/components/pagination/Pagination.vue @@ -1,7 +1,6 @@