mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-10 18:03:01 +00:00
fix: skip internal dep when type is pages, closes #2049
This commit is contained in:
parent
8b44ed4429
commit
be4b16440e
@ -106,6 +106,11 @@ function processChildren(schema: IPublicTypeNodeSchema): void {
|
||||
}
|
||||
}
|
||||
|
||||
function getInternalDep(internalDeps: Record<string, IInternalDependency>, depName: string) {
|
||||
const dep = internalDeps[depName];
|
||||
return (dep && dep.type !== InternalDependencyType.PAGE) ? dep : null;
|
||||
}
|
||||
|
||||
export class SchemaParser implements ISchemaParser {
|
||||
validate(schema: IPublicTypeProjectSchema): boolean {
|
||||
if (SUPPORT_SCHEMA_VERSION_LIST.indexOf(schema.version) < 0) {
|
||||
@ -221,12 +226,11 @@ export class SchemaParser implements ISchemaParser {
|
||||
}
|
||||
});
|
||||
|
||||
// 分析容器内部组件依赖
|
||||
containers.forEach((container) => {
|
||||
const depNames = this.getComponentNames(container);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
container.deps = uniqueArray<string>(depNames, (i: string) => i)
|
||||
.map((depName) => internalDeps[depName] || compDeps[depName])
|
||||
.map((depName) => getInternalDep(internalDeps, depName) || compDeps[depName])
|
||||
.filter(Boolean);
|
||||
// container.deps = Object.keys(compDeps).map((depName) => compDeps[depName]);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user