mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-11 18:36:03 +00:00
refactor: readonly 属性位置被编译到 class property 之后了, 先这样绕过
This commit is contained in:
parent
f54f5b5775
commit
a971bc786c
@ -41,10 +41,9 @@ export class Props implements IPropParent {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private stash = new PropStash(this, prop => {
|
readonly owner: Node;
|
||||||
this.items.push(prop);
|
|
||||||
prop.parent = this;
|
private stash: PropStash;
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 元素个数
|
* 元素个数
|
||||||
@ -55,7 +54,12 @@ export class Props implements IPropParent {
|
|||||||
|
|
||||||
@obx type: 'map' | 'list' = 'map';
|
@obx type: 'map' | 'list' = 'map';
|
||||||
|
|
||||||
constructor(readonly owner: Node, value?: PropsMap | PropsList | null, extras?: object) {
|
constructor(owner: Node, value?: PropsMap | PropsList | null, extras?: object) {
|
||||||
|
this.owner = owner;
|
||||||
|
this.stash = new PropStash(this, prop => {
|
||||||
|
this.items.push(prop);
|
||||||
|
prop.parent = this;
|
||||||
|
});
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
this.type = 'list';
|
this.type = 'list';
|
||||||
this.items = value.map(item => new Prop(this, item.value, item.name, item.spread, { skipSetSlot: true }));
|
this.items = value.map(item => new Prop(this, item.value, item.name, item.spread, { skipSetSlot: true }));
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"entry": {
|
"entry": {
|
||||||
"engine-core": "../engine/src/index-core.ts",
|
"engine-core": "../engine/src/index.ts",
|
||||||
"vision-polyfill": "../vision-polyfill/src/index.ts",
|
"vision-polyfill": "../vision-polyfill/src/index.ts",
|
||||||
"react-simulator-renderer": "../react-simulator-renderer/src/index.ts",
|
"react-simulator-renderer": "../react-simulator-renderer/src/index.ts",
|
||||||
"rax-simulator-renderer": "../rax-simulator-renderer/src/index.ts"
|
"rax-simulator-renderer": "../rax-simulator-renderer/src/index.ts"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user