mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-10 07:24:37 +08:00
monaco 暗黑
This commit is contained in:
parent
f7caa604d3
commit
a8b15d11d6
@ -28,19 +28,21 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initEditor() {
|
initEditor() {
|
||||||
|
let monacoEditorPreferences = {
|
||||||
|
value: "",
|
||||||
|
language: "javascript",
|
||||||
|
automaticLayout: true,
|
||||||
|
foldingStrategy: "indentation",
|
||||||
|
autoClosingBrackets: true,
|
||||||
|
tabSize: 2,
|
||||||
|
minimap: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
if (this.$q.dark.isActive) monacoEditorPreferences.theme = "vs-dark";
|
||||||
this.editor = monaco.editor.create(
|
this.editor = monaco.editor.create(
|
||||||
document.getElementById("monocaEditor"),
|
document.getElementById("monocaEditor"),
|
||||||
{
|
monacoEditorPreferences
|
||||||
value: "",
|
|
||||||
language: "javascript",
|
|
||||||
automaticLayout: true,
|
|
||||||
foldingStrategy: "indentation",
|
|
||||||
autoClosingBrackets: true,
|
|
||||||
tabSize: 2,
|
|
||||||
minimap: {
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
this.loadTypes();
|
this.loadTypes();
|
||||||
this.registerLanguage();
|
this.registerLanguage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user