mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
fix editor
This commit is contained in:
parent
7cece23769
commit
c19fb6d989
@ -89,7 +89,7 @@ export const BaseEditor: React.FC<Props> = (props) => {
|
|||||||
const trueTheme = theme === 'system' ? systemTheme : theme
|
const trueTheme = theme === 'system' ? systemTheme : theme
|
||||||
const { value, readOnly = false, language, onChange } = props
|
const { value, readOnly = false, language, onChange } = props
|
||||||
|
|
||||||
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>()
|
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>(undefined)
|
||||||
|
|
||||||
const editorWillMount = (): void => {
|
const editorWillMount = (): void => {
|
||||||
monacoInitialization()
|
monacoInitialization()
|
||||||
@ -141,6 +141,7 @@ export const BaseEditor: React.FC<Props> = (props) => {
|
|||||||
}}
|
}}
|
||||||
editorWillMount={editorWillMount}
|
editorWillMount={editorWillMount}
|
||||||
editorDidMount={editorDidMount}
|
editorDidMount={editorDidMount}
|
||||||
|
editorWillUnmount={(): void => { }}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user