Skip to content

Commit

Permalink
[Bug]: amis3.6.3无法批量编辑
Browse files Browse the repository at this point in the history
  • Loading branch information
tujiajun committed Jan 7, 2024
1 parent 72e3462 commit e6aa64c
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ async function getQuickEditSchema(field, options){
{
"actionType": "custom",
"script": `
var _display = _.cloneDeep(event.data._display);
${displayField}
doAction({actionType: 'setValue', "args": {"value": {_display}},componentId: "${quickEditId}"});
Expand Down Expand Up @@ -268,6 +267,23 @@ async function getQuickEditSchema(field, options){
"onEvent":{
"init":{
"actions":[
//amis3.6无法从数据域中直接拿到正确的selectitems,需要通过crud组件的getSelected()函数获取
{
"actionType": "custom",
"script": `
crudScoped = event.context.scoped.getComponentById('${options.crudId}');
const selectedItems = crudScoped && crudScoped.control.getSelected();
doAction({
"componentId": "${quickEditId}",
"actionType": "setValue",
"args": {
"value": {
selectedItems
}
}
});
`
},
{
"actionType": "setValue",
"componentId": quickEditId,
Expand Down

0 comments on commit e6aa64c

Please sign in to comment.