fix: editor init error

This commit is contained in:
MystiPanda
2024-06-30 18:01:46 +08:00
parent babcb00621
commit e2d522803c
3 changed files with 23 additions and 45 deletions

View File

@@ -20,8 +20,7 @@ import { useThemeMode } from "@/services/states";
import { readProfileFile, saveProfileFile } from "@/services/cmds";
import { Notice, Switch } from "@/components/base";
import getSystem from "@/utils/get-system";
import Editor from "@monaco-editor/react";
import MonacoEditor from "react-monaco-editor";
interface Props {
profileUid: string;
@@ -339,7 +338,7 @@ export const RulesEditorViewer = (props: Props) => {
marginLeft: "10px",
}}
>
<Editor
<MonacoEditor
language="yaml"
theme={themeMode === "light" ? "vs" : "vs-dark"}
height="100%"