diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index eac33defb..afc0bb0fe 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -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); } diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts index 6bb0175f0..e2356f76e 100644 --- a/app/src/util/onGetConfig.ts +++ b/app/src/util/onGetConfig.ts @@ -172,8 +172,8 @@ const initStatus = () => {
-