From e591abacec200fc7bf2a65980c9c5852cc23941f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Sun, 20 Sep 2020 16:48:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20JSSlot=20=E6=A0=BC=E5=BC=8F=E4=B9=9F?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E8=BD=AC=E6=8D=A2=E6=88=90=20JSBlock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-preset-vision/src/editor.ts | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/editor-preset-vision/src/editor.ts b/packages/editor-preset-vision/src/editor.ts index c374d1867..f63a8fc0e 100644 --- a/packages/editor-preset-vision/src/editor.ts +++ b/packages/editor-preset-vision/src/editor.ts @@ -189,20 +189,20 @@ function compatiableReducer(props: any) { if (!props || !isPlainObject(props)) { return props; } - // if (isJSSlot(props)) { - // return { - // type: 'JSBlock', - // value: { - // componentName: 'Slot', - // children: props.value, - // props: { - // slotTitle: props.title, - // slotName: props.name, - // }, - // }, - // }; - // } // 为了能降级到老版本,建议在后期版本去掉以下代码 + if (isJSSlot(props)) { + return { + type: 'JSBlock', + value: { + componentName: 'Slot', + children: props.value, + props: { + slotTitle: props.title, + slotName: props.name, + }, + }, + }; + } if (isJSExpression(props) && !props.events) { return { type: 'variable',