fix: MiniChart 仅新卡片创建一次 (避免重复)
This commit is contained in:
@@ -213,7 +213,8 @@
|
||||
'<div class="node-time"></div>';
|
||||
}
|
||||
grid.appendChild(card);
|
||||
if (isRow && typeof MiniChart !== 'undefined') {
|
||||
_cardCache[id] = card;
|
||||
if (isRow && typeof MiniChart !== 'undefined' && !_chartInstances[id]) {
|
||||
try {
|
||||
_chartInstances[id] = [
|
||||
new MiniChart(id+'-cpu', '#7aa2f7'),
|
||||
@@ -222,7 +223,6 @@
|
||||
];
|
||||
} catch(e) {}
|
||||
}
|
||||
_cardCache[id] = card;
|
||||
}
|
||||
|
||||
// 更新通用信息
|
||||
|
||||
Reference in New Issue
Block a user