This commit is contained in:
Vanessa 2022-06-27 10:33:29 +08:00
parent eaa1e5834f
commit e3ca2c42f1
2 changed files with 26 additions and 23 deletions

View file

@ -412,10 +412,10 @@ export const resizeTabs = () => {
setTimeout(() => {
// .layout .fn__flex-shrink {transition: width .3s ease;} 时需要再次计算 padding
setPadding(item.editor.protyle);
if (echarts) {
(item.editor.protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {
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();
}))
});
}
}, 200);
}