mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix:修复crud批量操作上下文event导致的ajax请求报错问题
This commit is contained in:
parent
ab5696a27f
commit
f3a9951fe6
@ -2,7 +2,13 @@ import React from 'react';
|
|||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
import pickBy from 'lodash/pickBy';
|
import pickBy from 'lodash/pickBy';
|
||||||
import omitBy from 'lodash/omitBy';
|
import omitBy from 'lodash/omitBy';
|
||||||
import {Renderer, RendererProps, filterTarget, mapTree} from 'amis-core';
|
import {
|
||||||
|
Renderer,
|
||||||
|
RendererProps,
|
||||||
|
createObjectFromChain,
|
||||||
|
filterTarget,
|
||||||
|
mapTree
|
||||||
|
} from 'amis-core';
|
||||||
import {SchemaNode, Schema, ActionObject, PlainObject} from 'amis-core';
|
import {SchemaNode, Schema, ActionObject, PlainObject} from 'amis-core';
|
||||||
import {CRUDStore, ICRUDStore, getMatchedEventTargets} from 'amis-core';
|
import {CRUDStore, ICRUDStore, getMatchedEventTargets} from 'amis-core';
|
||||||
import {
|
import {
|
||||||
@ -876,16 +882,21 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|||||||
.filter(item => item)
|
.filter(item => item)
|
||||||
.join(',');
|
.join(',');
|
||||||
|
|
||||||
const ctx = createObject(store.mergedData, {
|
const ctx = createObjectFromChain([
|
||||||
...selectedItems[0],
|
store.mergedData,
|
||||||
currentPageData: (store.mergedData?.items || []).concat(),
|
{
|
||||||
rows: selectedItems,
|
event: e // 固定事件数据从event.data中获取,方便批量操作按钮绑定动作时获取动作产生的数据
|
||||||
items: selectedItems,
|
},
|
||||||
selectedItems,
|
{
|
||||||
unSelectedItems: unSelectedItems,
|
...selectedItems[0],
|
||||||
ids,
|
currentPageData: (store.mergedData?.items || []).concat(),
|
||||||
event: e // 固定事件数据从event.data中获取,方便批量操作按钮绑定动作时获取动作产生的数据
|
rows: selectedItems,
|
||||||
});
|
items: selectedItems,
|
||||||
|
selectedItems,
|
||||||
|
unSelectedItems: unSelectedItems,
|
||||||
|
ids
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
let fn = () => {
|
let fn = () => {
|
||||||
if (action.actionType === 'dialog') {
|
if (action.actionType === 'dialog') {
|
||||||
|
Loading…
Reference in New Issue
Block a user