mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
删掉triggerNode
This commit is contained in:
parent
53acbdf8ec
commit
c9bf105b09
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
@ -490,7 +490,7 @@ export class DialogPlugin extends BasePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
// 弹窗改版无法可能会有多个按钮触发一个弹窗,无法确定按钮的上下文
|
||||
// 弹窗改版可能会有多个按钮触发一个弹窗,无法确定按钮的上下文
|
||||
// TODO 数据链
|
||||
// const hostNodeDataSchema =
|
||||
// await this.manager.config.getHostNodeDataSchema?.();
|
||||
|
Loading…
Reference in New Issue
Block a user