This commit is contained in:
Vanessa 2022-06-27 12:06:21 +08:00
parent 2ba32ffc7c
commit 5022e3c6c9
3 changed files with 35 additions and 31 deletions

View file

@ -414,7 +414,10 @@ export const resizeTabs = () => {
setPadding(item.editor.protyle);
if (typeof echarts !== "undefined") {
item.editor.protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {
echarts.getInstanceById(chartItem.firstElementChild.nextElementSibling.getAttribute("_echarts_instance_")).resize();
const chartInstance = echarts.getInstanceById(chartItem.firstElementChild.nextElementSibling.getAttribute("_echarts_instance_"))
if (chartInstance) {
chartInstance.resize();
}
});
}
}, 200);