mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-06 19:44:41 +08:00
fix: not auto-resize when the container size is 0, closes #831
This commit is contained in:
@ -40,6 +40,12 @@ export function useAutoresize(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip if container has zero size
|
||||||
|
if (root.offsetWidth === 0 || root.offsetHeight === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
resizeCallback();
|
resizeCallback();
|
||||||
});
|
});
|
||||||
ro.observe(root);
|
ro.observe(root);
|
||||||
|
Reference in New Issue
Block a user