mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-21 08:28:16 +00:00
Merge branch 'fix/prop-init' into 'release/0.9.0'
Fix/prop init See merge request !904709
This commit is contained in:
commit
6ca5253730
@ -66,7 +66,7 @@ export class Prop implements IPropParent {
|
|||||||
const type = this._type;
|
const type = this._type;
|
||||||
|
|
||||||
if (type === 'unset') {
|
if (type === 'unset') {
|
||||||
return UNSET;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'literal' || type === 'expression') {
|
if (type === 'literal' || type === 'expression') {
|
||||||
@ -98,9 +98,7 @@ export class Prop implements IPropParent {
|
|||||||
const maps: any = {};
|
const maps: any = {};
|
||||||
this.items!.forEach((prop, key) => {
|
this.items!.forEach((prop, key) => {
|
||||||
const v = prop.export(stage);
|
const v = prop.export(stage);
|
||||||
if (v !== UNSET) {
|
maps[prop.key == null ? key : prop.key] = v;
|
||||||
maps[prop.key == null ? key : prop.key] = v;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,11 @@ designer.addPropsReducer((props, node) => {
|
|||||||
newProps[item.name] = props[item.name];
|
newProps[item.name] = props[item.name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (newProps[item.name] && !node.props.has(item.name)) {
|
||||||
|
node.props.add(newProps[item.name], item.name);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return newProps;
|
return newProps;
|
||||||
}
|
}
|
||||||
return props;
|
return props;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user