1
0
mirror of synced 2026-04-03 14:38:37 +08:00

fix(core): getNode 添加stict参数来表示必须知道页面片容器id才会返回页面内的节点

This commit is contained in:
roymondchen
2025-12-09 15:51:15 +08:00
parent b3ce1a3b93
commit 83664cd440
9 changed files with 18 additions and 12 deletions

View File

@@ -82,7 +82,7 @@ export const useFormConfig = (props: AppProps) => {
if (!parent) throw new Error('未找到父节点');
if (config.type !== 'page') {
const parentNode = app?.page?.getNode(parent.id);
const parentNode = app?.page?.getNode(parent.id, { strict: true });
parentNode && app?.page?.initNode(config, parentNode);
}
@@ -103,7 +103,7 @@ export const useFormConfig = (props: AppProps) => {
const newNode = app.dataSourceManager?.compiledNode(config) || config;
replaceChildNode(reactive(newNode), [root.value], parentId);
const nodeInstance = app.page?.getNode(config.id);
const nodeInstance = app.page?.getNode(config.id, { strict: true });
if (nodeInstance) {
nodeInstance.setData(config);
}