mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-05 01:37:17 +00:00
Merge commit 'ef5dd50bc886aa6c148e310fba4c1cbd415bb47c' into def_releases_2021092316393939_ali-lowcode_ali-lowcode-engine/1.0.69
This commit is contained in:
commit
d2fa3f53be
@ -152,10 +152,15 @@ export class Prop implements IPropParent {
|
|||||||
if (!this._items) {
|
if (!this._items) {
|
||||||
return this._value;
|
return this._value;
|
||||||
}
|
}
|
||||||
const maps: any = {};
|
let maps: any;
|
||||||
this.items!.forEach((prop, key) => {
|
this.items!.forEach((prop, key) => {
|
||||||
const v = prop.export(stage);
|
if (!prop.isUnset()) {
|
||||||
maps[prop.key == null ? key : prop.key] = v;
|
const v = prop.export(stage);
|
||||||
|
if (v != null) {
|
||||||
|
maps = maps || {};
|
||||||
|
maps[prop.key || key] = prop.export(stage);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,12 +129,11 @@ export class Props implements IPropParent {
|
|||||||
} else {
|
} else {
|
||||||
this.items.forEach(item => {
|
this.items.forEach(item => {
|
||||||
let name = item.key as string;
|
let name = item.key as string;
|
||||||
if (name == null) {
|
if (name == null || item.isUnset() || item.isVirtual()) return;
|
||||||
// todo ...spread
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let value = item.export(stage);
|
let value = item.export(stage);
|
||||||
allProps[name] = value;
|
if (value != null) {
|
||||||
|
allProps[name] = value;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// compatible vision
|
// compatible vision
|
||||||
const transformedProps = this.transformToStatic(allProps);
|
const transformedProps = this.transformToStatic(allProps);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user