refactor: 优化图片预览插件中节点子类型的类型定义
continuous-integration/drone/push Build is passing

This commit is contained in:
seahi committed 2026-09-23 10:10:34 +08:00
1 parent bcab2fc280
commit 932eb486fd
1 file changed
+1 -2
+1 -2
View File
@@ -35,7 +35,6 @@ class ImagePreviewWidget extends WidgetType {
}
}
function getImageDecorationsForState(state: EditorState) {
const widgets: Range<Decoration>[] = [];
@@ -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 节点