Skip to content

Commit 5c43fbf

Browse files
author
roymondchen
committed
fix(data-source): 多页面时数据源依赖中可能包含其他页面的,导致更新时失败
1 parent 948c194 commit 5c43fbf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/data-source/src/createDataSourceManager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ export const createDataSourceManager = (app: AppCore, useMock?: boolean, initial
5959

6060
const nodeIds = union([...Object.keys(condDep), ...Object.keys(dep)]);
6161

62+
const pages = app.page?.data && app.platform !== 'editor' ? [app.page.data] : dsl.items;
63+
6264
dataSourceManager.emit(
6365
'update-data',
64-
getNodes(nodeIds, dsl.items).map((node) => {
66+
getNodes(nodeIds, pages).map((node) => {
6567
if (app.platform !== 'editor') {
6668
node.condResult = dataSourceManager.compliedConds(node);
6769
}

0 commit comments

Comments
 (0)