mirror of https://github.com/1Panel-dev/1Panel
fix: 计划任务详情页删除时刷新选中值 (#1616)
parent
1a891cb048
commit
f40b053e5b
|
@ -186,6 +186,8 @@ func (u *CronjobService) HandleRmExpired(backType, backupPath, localDir string,
|
|||
itemPath := strings.TrimPrefix(backupPath, "/")
|
||||
itemPath = strings.TrimSuffix(itemPath, "/") + "/"
|
||||
fileItem = itemPath + strings.TrimPrefix(file, localDir+"/")
|
||||
} else {
|
||||
fileItem = strings.TrimPrefix(file, localDir+"/")
|
||||
}
|
||||
}
|
||||
_, _ = backClient.Delete(fileItem)
|
||||
|
|
|
@ -528,12 +528,17 @@ const search = async () => {
|
|||
if (!currentRecord.value) {
|
||||
currentRecord.value = records.value[0];
|
||||
} else {
|
||||
let beDelete = true;
|
||||
for (const item of records.value) {
|
||||
if (item.id === currentRecord.value.id) {
|
||||
beDelete = false;
|
||||
currentRecord.value = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (beDelete) {
|
||||
currentRecord.value = records.value[0];
|
||||
}
|
||||
}
|
||||
if (currentRecord.value?.records) {
|
||||
loadRecord(currentRecord.value);
|
||||
|
|
Loading…
Reference in New Issue