From 1a3567cb05d8f68c627936c00e9ed1ce81960e22 Mon Sep 17 00:00:00 2001 From: Traveller <117014547+Traveller23@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:54:56 +0800 Subject: [PATCH] feat: allow component metadata storage (#578) # Conflicts: # packages/core/src/interfaces/nodes.ts # packages/core/src/utils/createNode.ts --- packages/core/src/store/query/NodeQuery.ts | 4 ++++ packages/core/src/utils/resolveNode.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/core/src/store/query/NodeQuery.ts b/packages/core/src/store/query/NodeQuery.ts index e5b98decc..69bc6687d 100644 --- a/packages/core/src/store/query/NodeQuery.ts +++ b/packages/core/src/store/query/NodeQuery.ts @@ -107,6 +107,10 @@ export class NodeQuery { return this.node.custom; } + get info() { + return this.getConfig().info; + } + getState() { return this.node; } diff --git a/packages/core/src/utils/resolveNode.ts b/packages/core/src/utils/resolveNode.ts index 6663dc1b6..555773853 100644 --- a/packages/core/src/utils/resolveNode.ts +++ b/packages/core/src/utils/resolveNode.ts @@ -36,6 +36,7 @@ export const getResolverConfig = (type: string, resolver: Resolver) => { related: {}, props: {}, custom: {}, + info: {}, isCanvas: false, };