From 932eb486fd96c81d98a5880626abd9ce297e3270 Mon Sep 17 00:00:00 2001 From: seaHi Date: Wed, 23 Sep 2026 10:10:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=A2=84=E8=A7=88=E6=8F=92=E4=BB=B6=E4=B8=AD=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E5=AD=90=E7=B1=BB=E5=9E=8B=E7=9A=84=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/editor/imagePreviewPlugin.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/editor/imagePreviewPlugin.ts b/src/lib/editor/imagePreviewPlugin.ts index 5bd6739..3141b8e 100644 --- a/src/lib/editor/imagePreviewPlugin.ts +++ b/src/lib/editor/imagePreviewPlugin.ts @@ -35,7 +35,6 @@ class ImagePreviewWidget extends WidgetType { } } - function getImageDecorationsForState(state: EditorState) { const widgets: Range[] = []; @@ -44,7 +43,7 @@ function getImageDecorationsForState(state: EditorState) { name: string; from: number; to: number; - node: { getChild: (type: string) => any }; + node: { getChild: (type: string) => { from: number; to: number } | null }; }) => { if (node.name === 'Image') { // 查找图片语法中的 URL 节点