diff --git a/web/src/views/editor/Editor.vue b/web/src/views/editor/Editor.vue index 23290a5..c144584 100644 --- a/web/src/views/editor/Editor.vue +++ b/web/src/views/editor/Editor.vue @@ -115,7 +115,16 @@ async function fetchPaths() { const editorRef = shallowRef() const isSmallScreen = ref(window.innerWidth < 1024) -const editorFontSize = computed(() => isSmallScreen.value ? 12 : 13) + +const editorOptions = computed(() => ({ + minimap: { enabled: false }, + fontSize: isSmallScreen.value ? 12 : 13, + lineNumbers: 'on' as const, + scrollBeyondLastLine: false, + readOnly: !isEditMode.value, + domReadOnly: !isEditMode.value, + automaticLayout: true, +})) function handleEditorMount(editor: any) { editorRef.value = editor @@ -473,14 +482,7 @@ onUnmounted(() => {