From 4bddef8238063cade7b0daca6925832da0113660 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Thu, 5 May 2022 11:44:56 +0800 Subject: [PATCH] [Fix][UI Next][V1.0.0-Beta] Fix the page input error on the token manage page. (#9879) --- .../src/views/security/token-manage/use-table.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts b/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts index 37f75bb9e8..c017f44cef 100644 --- a/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts +++ b/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts @@ -149,13 +149,13 @@ export function useTable() { }) const handleDelete = (row: any) => { + if (variables.tableData.length === 1 && variables.page > 1) { + --variables.page + } deleteToken(row.id).then(() => { getTableData({ pageSize: variables.pageSize, - pageNo: - variables.tableData.length === 1 && variables.page > 1 - ? variables.page - 1 - : variables.page, + pageNo: variables.page, searchVal: variables.searchVal }) })