提交 772b5577 作者: yueyang.lv

fix: 修复 codemirror 报错问题,包管理器更换为 yarn

上级 658557e7
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
"homepage": ".", "homepage": ".",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@codemirror/lang-json": "^0.19.1", "@codemirror/lang-json": "^6.0.0",
"@codemirror/legacy-modes": "^0.19.0", "@codemirror/legacy-modes": "^6.1.0",
"@codemirror/stream-parser": "^0.19.3",
"@date-io/moment": "1.x", "@date-io/moment": "1.x",
"@emotion/react": "^11.4.1", "@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0", "@emotion/styled": "^11.3.0",
...@@ -35,7 +34,6 @@ ...@@ -35,7 +34,6 @@
"@types/websocket": "^1.0.0", "@types/websocket": "^1.0.0",
"@uiw/react-codemirror": "^4.3.2", "@uiw/react-codemirror": "^4.3.2",
"chart.js": "^2.9.3", "chart.js": "^2.9.3",
"codemirror": "^5.52.2",
"history": "^4.10.1", "history": "^4.10.1",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"kbar": "^0.1.0-beta.27", "kbar": "^0.1.0-beta.27",
...@@ -105,6 +103,7 @@ ...@@ -105,6 +103,7 @@
}, },
"resolutions": { "resolutions": {
"nth-check": "^2.0.1", "nth-check": "^2.0.1",
"postcss": "^8.2.13" "postcss": "^8.2.13",
"@types/react": "^17.0.0"
} }
} }
...@@ -23,8 +23,9 @@ import * as serviceWorker from "./serviceWorker"; ...@@ -23,8 +23,9 @@ import * as serviceWorker from "./serviceWorker";
import { import {
StyledEngineProvider, StyledEngineProvider,
Theme, Theme,
ThemeProvider, ThemeProvider as ThemeProviderOld,
} from "@mui/material/styles"; } from "@mui/material/styles";
import { ThemeProvider } from "@mui/styles";
import withStyles from "@mui/styles/withStyles"; import withStyles from "@mui/styles/withStyles";
import "react-virtualized/styles.css"; import "react-virtualized/styles.css";
import "react-grid-layout/css/styles.css"; import "react-grid-layout/css/styles.css";
...@@ -110,7 +111,9 @@ ReactDOM.render( ...@@ -110,7 +111,9 @@ ReactDOM.render(
<GlobalCss /> <GlobalCss />
<StyledEngineProvider injectFirst> <StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Routes /> <ThemeProviderOld theme={theme}>
<Routes />
</ThemeProviderOld>
</ThemeProvider> </ThemeProvider>
</StyledEngineProvider> </StyledEngineProvider>
</Provider>, </Provider>,
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
import React, { useState } from "react"; import React, { useState } from "react";
import Grid from "@mui/material/Grid"; import Grid from "@mui/material/Grid";
import "codemirror/theme/dracula.css"; // import "codemirror/theme/dracula.css";
/** Code mirror */ /** Code mirror */
import { Extension } from '@codemirror/state'; import { Extension } from "@codemirror/state";
import CodeMirror from "@uiw/react-codemirror"; import CodeMirror from "@uiw/react-codemirror";
import { StreamLanguage } from "@codemirror/stream-parser"; import { StreamLanguage } from "@codemirror/language";
import { json } from "@codemirror/lang-json"; import { json } from "@codemirror/lang-json";
import { yaml } from "@codemirror/legacy-modes/mode/yaml"; import { yaml } from "@codemirror/legacy-modes/mode/yaml";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论