fix: 盯盘防闪烁(watchRendering守卫+60s刷新)
This commit is contained in:
+6
-1
@@ -1513,9 +1513,12 @@ function watchResetFilters() {
|
||||
renderWatch();
|
||||
}
|
||||
|
||||
let watchRendering = false;
|
||||
async function renderWatch() {
|
||||
if (watchRendering) return;
|
||||
watchRendering = true;
|
||||
const el = document.getElementById('watchContent');
|
||||
if (!el) return;
|
||||
if (!el) { watchRendering = false; return; }
|
||||
try {
|
||||
if (watchTimer) clearInterval(watchTimer);
|
||||
if (!watchChipsInit) { watchRenderChips(); watchChipsInit = true; }
|
||||
@@ -1657,6 +1660,8 @@ async function renderWatch() {
|
||||
} catch(e) {
|
||||
el.innerHTML = '<div class="p-6 text-red-400 text-sm">加载失败: ' + e.message + '</div>';
|
||||
watchTimer = setInterval(renderWatch, 60000);
|
||||
} finally {
|
||||
watchRendering = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user