Fix: 修复nwjs打包后板卡页面载入异常

This commit is contained in:
王立帮
2025-02-24 23:10:39 +08:00
parent 8699cf26d7
commit 9eb5e500fe
5 changed files with 7 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ class EditorBlockly extends EditorBase {
this.workspace = null;
this.initBlockly = () => {
const DEFAULT_CATEGORIES = HTMLTemplate.get('xml/default-categories.xml').render();
const media = path.join(Config.pathPrefix, 'common/media/');
const media = path.join(Env.srcDirPath, 'common/media/');
const renderer = ['geras', 'zelos'].includes(USER.blockRenderer) ? USER.blockRenderer : 'geras';
this.editor = Blockly.inject(this.$blockly[0], {
media,