fix: JSSlot 格式也需要转换成 JSBlock

This commit is contained in:
力皓 2020-09-20 16:48:19 +08:00
parent 91fdb160f3
commit e591abacec

View File

@ -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',