mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-07 10:57:19 +00:00
fix: 修复 condition 代码导出错误
This commit is contained in:
parent
93ff5c2393
commit
57b30cf785
@ -96,8 +96,10 @@ export function generateReactCtrlLine(nodeItem: IComponentNodeItem): CodePiece[]
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nodeItem.condition) {
|
if (nodeItem.condition) {
|
||||||
|
const [isString, value] = generateCompositeType(nodeItem.condition);
|
||||||
|
|
||||||
pieces.unshift({
|
pieces.unshift({
|
||||||
value: `(${generateCompositeType(nodeItem.condition)}) && (`,
|
value: `(${isString ? `'${value}'` : value}) && (`,
|
||||||
type: PIECE_TYPE.BEFORE,
|
type: PIECE_TYPE.BEFORE,
|
||||||
});
|
});
|
||||||
pieces.push({
|
pieces.push({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user