mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
优化 dialog maping
This commit is contained in:
parent
2deb59cc2f
commit
a2163a3e26
@ -88,9 +88,16 @@ export const iRendererStore = types
|
||||
});
|
||||
|
||||
if (self.action.dialog && self.action.dialog.data) {
|
||||
self.dialogData = createObject(proto, {
|
||||
...dataMapping(self.action.dialog.data, data)
|
||||
});
|
||||
self.dialogData = dataMapping(self.action.dialog.data, data);
|
||||
|
||||
const clonedAction = {
|
||||
...self.action,
|
||||
dialog: {
|
||||
...self.action.dialog
|
||||
}
|
||||
};
|
||||
delete clonedAction.dialog.data;
|
||||
self.action = clonedAction;
|
||||
} else {
|
||||
self.dialogData = data;
|
||||
}
|
||||
@ -125,6 +132,15 @@ export const iRendererStore = types
|
||||
|
||||
if (self.action.drawer.data) {
|
||||
self.drawerData = dataMapping(self.action.drawer.data, data);
|
||||
|
||||
const clonedAction = {
|
||||
...self.action,
|
||||
dialog: {
|
||||
...self.action.dialog
|
||||
}
|
||||
};
|
||||
delete clonedAction.dialog.data;
|
||||
self.action = clonedAction;
|
||||
} else {
|
||||
self.drawerData = data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user