Update: 调整板卡载入方式
This commit is contained in:
@@ -66,12 +66,18 @@ window.addEventListener('load', () => {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$categories.children('category').length) {
|
||||
$categories.html('<category></category>');
|
||||
}
|
||||
$('#toolbox').html($categories.html());
|
||||
LazyLoad.css(cssPaths);
|
||||
$categories && $('#toolbox').html($categories.html());
|
||||
cssPaths.length && LazyLoad.css(cssPaths);
|
||||
if (scrpitPaths.length) {
|
||||
LazyLoad.js(scrpitPaths, () => {
|
||||
Loader.start();
|
||||
});
|
||||
} else {
|
||||
Loader.start();
|
||||
}
|
||||
});
|
||||
|
||||
Loader.start = () => {
|
||||
if (window.frames.length !== parent.frames.length) {
|
||||
window.userEvents = new UserEvents(Editor.blockEditor);
|
||||
}
|
||||
@@ -87,8 +93,7 @@ window.addEventListener('load', () => {
|
||||
Env.defaultXML = $('#toolbox').html();
|
||||
Loader.init();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loader.init = () => {
|
||||
const selectedBoardName = Boards.getSelectedBoardName();
|
||||
|
||||
Reference in New Issue
Block a user