Skip to content

Commit

Permalink
fix_monaco_cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
zackyoungh committed Dec 20, 2023
1 parent 1f496ae commit 37b6eef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dinky-web/src/components/CustomEditor/CodeEdit/function.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import ITextModel = editor.ITextModel;
import ProviderResult = languages.ProviderResult;
import CompletionList = languages.CompletionList;
import CompletionItem = languages.CompletionItem;
import {loader} from "@monaco-editor/react";
// 导入 lodash
loader.config({ monaco });

/**
* get keyWordJson from {@link ./keyword.json}
Expand Down
4 changes: 3 additions & 1 deletion dinky-web/src/components/CustomEditor/CodeEdit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { handleInitEditorAndLanguageOnBeforeMount } from '@/components/CustomEdi
import { StateType } from '@/pages/DataStudio/model';
import { MonacoEditorOptions, SuggestionInfo } from '@/types/Public/data';
import { convertCodeEditTheme } from '@/utils/function';
import { Editor, Monaco, OnChange } from '@monaco-editor/react';
import {Editor, loader, Monaco, OnChange} from '@monaco-editor/react';
import { connect } from '@umijs/max';
import useMemoCallback from 'rc-menu/es/hooks/useMemoCallback';
import { memo, useCallback, useRef } from 'react';
Expand All @@ -35,6 +35,8 @@ import CompletionContext = languages.CompletionContext;
import CompletionList = languages.CompletionList;
import ProviderResult = languages.ProviderResult;

loader.config({ monaco });

let provider = {
dispose: () => {}
};
Expand Down

0 comments on commit 37b6eef

Please sign in to comment.