From 1a01f96047bfb3d8c665f37be1356cd78d0d54e0 Mon Sep 17 00:00:00 2001 From: ZvonimirSun Date: Wed, 20 Dec 2023 01:26:52 +0800 Subject: [PATCH] =?UTF-8?q?chore(editor):=20extensions=E6=97=A0=E9=9C=80?= =?UTF-8?q?=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/editor/Editor.vue | 4 ++-- src/components/editor/EditorMini.vue | 4 ++-- src/components/editor/lang-basic.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/editor/Editor.vue b/src/components/editor/Editor.vue index f86f9b66b..1606513b6 100644 --- a/src/components/editor/Editor.vue +++ b/src/components/editor/Editor.vue @@ -28,8 +28,8 @@ const hasRedo = ref(false) onMounted(() => { const extensions = [ - ...basic.extensions, - ...props.plugin?.extensions || [], + basic.extensions, + props.plugin?.extensions || [], EditorView.updateListener.of(onChange), themeCompartment.of(useStyleStore().isDark ? oneDarkTheme : EditorView.theme({}, { dark: false })), hightLightCompartment.of(useStyleStore().isDark ? syntaxHighlighting(oneDarkHighlightStyle, { fallback: true }) : syntaxHighlighting(defaultHighlightStyle)) diff --git a/src/components/editor/EditorMini.vue b/src/components/editor/EditorMini.vue index 1523404c4..1ab4e67d0 100644 --- a/src/components/editor/EditorMini.vue +++ b/src/components/editor/EditorMini.vue @@ -25,8 +25,8 @@ const hightLightCompartment = new Compartment() onMounted(() => { const extensions = [ - ...mini.extensions, - ...props.plugin ? props.plugin.miniExtensions || props.plugin.extensions : [], + mini.extensions, + props.plugin ? props.plugin.miniExtensions || props.plugin.extensions : [], EditorView.updateListener.of(onChange), themeCompartment.of(useStyleStore().isDark ? oneDarkTheme : EditorView.theme({}, { dark: false })), hightLightCompartment.of(useStyleStore().isDark ? syntaxHighlighting(oneDarkHighlightStyle, { fallback: true }) : syntaxHighlighting(defaultHighlightStyle)) diff --git a/src/components/editor/lang-basic.ts b/src/components/editor/lang-basic.ts index f45cfe2a7..2a4abc772 100644 --- a/src/components/editor/lang-basic.ts +++ b/src/components/editor/lang-basic.ts @@ -32,7 +32,7 @@ function baseInfoPanel (view: EditorView): Panel { const plugin: EditorPlugin = { ...mini, extensions: [ - ...mini.extensions, + mini.extensions, showPanel.of(baseInfoPanel), lintGutter() ]