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 }) })