This commit is contained in:
Vanessa 2022-06-27 09:38:34 +08:00
parent 717f3b356c
commit d725d414c9
2 changed files with 6 additions and 0 deletions

View file

@ -412,6 +412,11 @@ 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) => {
echarts.getInstanceById(chartItem.firstElementChild.nextElementSibling.getAttribute("_echarts_instance_")).resize();
}))
}
}, 200);
}
});

View file

@ -1,6 +1,7 @@
declare const echarts: {
init(element: HTMLElement, theme?: string, options?: { width: number }): IEChart;
dispose(element: Element): void;
getInstanceById(id: string): { resize: () => void };
};
declare const hljs: {