mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-16 03:18:11 +00:00
fix: 在压缩态没有类名, 换个方式实现
This commit is contained in:
parent
7d4496eac2
commit
f874823502
@ -5,6 +5,8 @@ import { Node } from '../node';
|
|||||||
|
|
||||||
export type PendingItem = Prop[];
|
export type PendingItem = Prop[];
|
||||||
export class PropStash implements IPropParent {
|
export class PropStash implements IPropParent {
|
||||||
|
readonly isPropStash = true;
|
||||||
|
|
||||||
@obx.val private space: Set<Prop> = new Set();
|
@obx.val private space: Set<Prop> = new Set();
|
||||||
|
|
||||||
@computed private get maps(): Map<string | number, Prop> {
|
@computed private get maps(): Map<string | number, Prop> {
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export function getProjectUtils(librayMap: LibrayMap, utilsMetadata: UtilsMetada
|
|||||||
*/
|
*/
|
||||||
export function getUppermostPropKey(prop: any): string {
|
export function getUppermostPropKey(prop: any): string {
|
||||||
let curProp = prop;
|
let curProp = prop;
|
||||||
while (curProp.parent.constructor.name !== 'Props' && curProp.parent.constructor.name !== 'PropStash') {
|
while (curProp.parent.isProp) {
|
||||||
curProp = curProp.parent;
|
curProp = curProp.parent;
|
||||||
}
|
}
|
||||||
return curProp.key;
|
return curProp.key;
|
||||||
@ -84,7 +84,7 @@ export function setInstancesProp(data: ActivityData, doc: DocumentInstance) {
|
|||||||
let value = (schema.props as any)[propKey];
|
let value = (schema.props as any)[propKey];
|
||||||
// 当 prop 是在 PropStash 中产生时,该 prop 需要在下一个 obx 的时钟周期才能挂载到相应位置,
|
// 当 prop 是在 PropStash 中产生时,该 prop 需要在下一个 obx 的时钟周期才能挂载到相应位置,
|
||||||
// 而 schema 是同步 export 得到的,此时 schema 中还没有对应的值,所以直接取 newValue
|
// 而 schema 是同步 export 得到的,此时 schema 中还没有对应的值,所以直接取 newValue
|
||||||
if (prop.parent.constructor.name === 'PropStash') {
|
if (prop.parent.isPropStash) {
|
||||||
value = newValue;
|
value = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user