mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: monaco: lazy load resources
This commit is contained in:
1 parent
538862de07
commit
f020923d35
8 files changed
+57
-26
No files matched your search
@@ -36,7 +36,8 @@ export default class Editor extends DOMAttachedObject {
|
||||
}
|
||||
|
||||
async initMonaco() {
|
||||
const { default: monaco, registerAction } = await import('vj/components/monaco/index');
|
||||
const { load } = await import('vj/components/monaco/loader');
|
||||
const { monaco, registerAction } = await load(['markdown']);
|
||||
const {
|
||||
onChange, language = 'markdown',
|
||||
theme = UserContext.monacoTheme || 'vs-light',
|
||||
|
||||
Reference in new issue
Block a user