删掉triggerNode

This commit is contained in:
ascend13 2023-09-19 21:09:36 +08:00
parent 53acbdf8ec
commit c9bf105b09
3 changed files with 2 additions and 17 deletions

View File

@ -94,15 +94,6 @@ export default class Preview extends Component<PreviewProps> {
store.changeOutlineTabsKey('dialog-outline');
store.setPreviewDialogId(dialogId);
store.setActiveId(dialogId);
// 添加触发弹窗事件的上下文
const eventPaths = store
.getSchemaPath(dialogId)
?.split('/onEvent')[0]
?.split('/');
if (eventPaths.length) {
const triggerNode = store.getSchemaByPath(eventPaths);
store.setTriggerNodeId(triggerNode.$$id);
}
} else {
store.setActiveId(store.getRootId());
}

View File

@ -223,9 +223,7 @@ export const MainStore = types
/** 应用语料 */
appCorpusData: types.optional(types.frozen(), {}),
/** 应用多语言状态,用于其它组件进行订阅 */
appLocaleState: types.optional(types.number, 0),
/** 当前触发弹窗的节点id */
triggerNodeId: ''
appLocaleState: types.optional(types.number, 0)
})
.views(self => {
return {
@ -1922,10 +1920,6 @@ export const MainStore = types
setAppCorpusData(data: any = {}) {
self.appCorpusData = data;
this.updateAppLocaleState();
},
setTriggerNodeId(id: string) {
self.triggerNodeId = id;
}
};
});

View File

@ -490,7 +490,7 @@ export class DialogPlugin extends BasePlugin {
}
}
// 弹窗改版无法可能会有多个按钮触发一个弹窗,无法确定按钮的上下文
// 弹窗改版可能会有多个按钮触发一个弹窗,无法确定按钮的上下文
// TODO 数据链
// const hostNodeDataSchema =
// await this.manager.config.getHostNodeDataSchema?.();