feat(core,data-source,ui,ui-react,ui-vue2,utils,runtime): 解析显示条件配置
This commit is contained in:
@@ -31,10 +31,9 @@ function App() {
|
||||
|
||||
const [config, setConfig] = useState(app.page.data);
|
||||
|
||||
app.dataSourceManager?.on('update-data', (nodes: MNode[], sourceId: string) => {
|
||||
app.dataSourceManager?.on('update-data', (nodes: MNode[]) => {
|
||||
nodes.forEach((node) => {
|
||||
const newNode = app.compiledNode(node, app.dataSourceManager?.data || {}, sourceId);
|
||||
replaceChildNode(newNode, [config]);
|
||||
replaceChildNode(node, [config]);
|
||||
setConfig(cloneDeep(config));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -108,7 +108,7 @@ const operations = {
|
||||
},
|
||||
|
||||
update({ config, root }: UpdateData) {
|
||||
replaceChildNode(app.compiledNode(config, app.dataSourceManager?.data || {}), root.items);
|
||||
replaceChildNode(app.dataSourceManager?.compiledNode(config) || config, root.items);
|
||||
updateConfig(cloneDeep(root));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user