From 8e46dcedc24b61f7e80579164e7cbb225087d831 Mon Sep 17 00:00:00 2001 From: engigu Date: Thu, 26 Mar 2026 14:58:23 +0800 Subject: [PATCH] chore: update editor canceld js -- refact --- web/src/views/editor/Editor.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/views/editor/Editor.vue b/web/src/views/editor/Editor.vue index c144584..137dda1 100644 --- a/web/src/views/editor/Editor.vue +++ b/web/src/views/editor/Editor.vue @@ -115,15 +115,20 @@ 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, + fontSize: editorFontSize.value, lineNumbers: 'on' as const, scrollBeyondLastLine: false, readOnly: !isEditMode.value, domReadOnly: !isEditMode.value, automaticLayout: true, + tabSize: 2, + wordWrap: 'on' as const, + folding: true, + renderLineHighlight: 'all' as const, })) function handleEditorMount(editor: any) {