修复了数据管理页面删除时不能及时刷新页面的BUG
This commit is contained in:
@@ -519,18 +519,8 @@ async function doDelete(id){
|
||||
if(data.status!=='success') throw new Error(data.message || '删除失败');
|
||||
|
||||
alert('删除成功');
|
||||
// 重新加载数据
|
||||
if (searchResultDiv.style.display !== 'none') {
|
||||
const query = searchQueryInput.value.trim();
|
||||
if (query) {
|
||||
const isFuzzy = document.querySelector('.search-result').textContent.includes('模糊');
|
||||
performSearch(isFuzzy ? 'fuzzy' : 'exact');
|
||||
} else {
|
||||
loadAllData();
|
||||
}
|
||||
} else {
|
||||
loadAllData();
|
||||
}
|
||||
// 立即刷新页面以显示最新数据
|
||||
location.reload();
|
||||
} catch (e) {
|
||||
alert(e.message||'删除失败');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user