fix: 修复状态变更时分页没有正确重置的问题

This commit is contained in:
tbphp
2025-07-30 19:44:24 +08:00
parent 734938b787
commit cddd0e268d

View File

@@ -92,10 +92,18 @@ watch(
{ immediate: true }
);
watch([currentPage, pageSize, statusFilter], async () => {
watch([currentPage, pageSize], async () => {
await loadKeys();
});
watch(statusFilter, async () => {
if (currentPage.value !== 1) {
currentPage.value = 1;
} else {
await loadKeys();
}
});
// 监听任务完成事件,自动刷新密钥列表
watch(
() => appState.groupDataRefreshTrigger,
@@ -119,9 +127,12 @@ watch(
// 处理搜索输入的防抖
function handleSearchInput() {
currentPage.value = 1; // 搜索时重置到第一页
if (currentPage.value !== 1) {
currentPage.value = 1;
} else {
loadKeys();
}
}
// 处理更多操作菜单
function handleMoreAction(key: string) {