Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:children_crossing: fix https://github.com/siyuan-note/siyuan/issues/5296

Vanessad725d414c946
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index 6589a556ec..eac33defbe 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -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);
}
});
diff --git a/app/src/types/protyle.d.ts b/app/src/types/protyle.d.ts
index 2737f678eb..7803ea06c2 100644
--- a/app/src/types/protyle.d.ts
+++ b/app/src/types/protyle.d.ts
@@ -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: {