mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-03 16:07:24 +00:00
fix: JSSlot 格式也需要转换成 JSBlock
This commit is contained in:
parent
91fdb160f3
commit
e591abacec
@ -189,20 +189,20 @@ function compatiableReducer(props: any) {
|
|||||||
if (!props || !isPlainObject(props)) {
|
if (!props || !isPlainObject(props)) {
|
||||||
return 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) {
|
if (isJSExpression(props) && !props.events) {
|
||||||
return {
|
return {
|
||||||
type: 'variable',
|
type: 'variable',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user