Skip to content

Commit

Permalink
[Bug]: 列表页使用批量编辑功能,控制台报错 #6185
Browse files Browse the repository at this point in the history
  • Loading branch information
tujiajun committed Jan 10, 2024
1 parent b2b52d0 commit 906bc3e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@ async function getQuickEditSchema(field, options){
{
actionType: "custom",
script: `
console.log("asdasd");
let items = _.cloneDeep(event.data.items);
let selectedItems = _.cloneDeep(event.data.selectedItems);
if(event.data.isBatchEdit){
selectedItems.forEach(function(selectedItem){
selectedItem._display.${field.name} = event.data._display.${field.name};
doAction({actionType: 'setValue', "args": {"value": selectedItem._display},componentId: ${options.objectName} + "_display_" + selectedItem._index});
doAction({actionType: 'setValue', "args": {"value": selectedItem._display},componentId: "${options.objectName}" + "_display_" + selectedItem._index});
doAction({actionType: 'setValue', "args": {"value": event.data.${field.name}},componentId: "${options.objectName + "_" + field.name + "_"}" + selectedItem._index});
})
}else{
doAction({actionType: 'setValue', "args": {"value": event.data._display},componentId: ${options.objectName} + "_display_" + event.data._index});
doAction({actionType: 'setValue', "args": {"value": event.data._display},componentId: "${options.objectName}" + "_display_" + event.data._index});
doAction({actionType: 'setValue', "args": {"value": event.data.${field.name}},componentId: "${options.objectName + "_" + field.name + "_"}" + event.data._index});
}
`
Expand Down

1 comment on commit 906bc3e

@tujiajun
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.