fix: update

This commit is contained in:
Fine 2024-01-22 16:52:17 +08:00
parent 0bda346422
commit e4916a4ad9

View File

@ -60,11 +60,9 @@ limitations under the License. -->
} }
draw(); draw();
loading.value = false; loading.value = false;
window.addEventListener("resize", resize); window.addEventListener("resize", debounceFunc);
}); });
function resize() {
debounceFunc();
}
function draw() { function draw() {
if (!traceGraph.value) { if (!traceGraph.value) {
return; return;
@ -282,7 +280,7 @@ limitations under the License. -->
} }
onBeforeUnmount(() => { onBeforeUnmount(() => {
d3.selectAll(".d3-tip").remove(); d3.selectAll(".d3-tip").remove();
window.removeEventListener("resize", resize); window.removeEventListener("resize", debounceFunc);
}); });
watch( watch(
() => props.data, () => props.data,