mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
Merge pull request #5977 from hsm-lv/fix-inputImage-event
feat:图片上传成功事件参数优化
This commit is contained in:
commit
c3d32ad10d
@ -1,5 +1,3 @@
|
||||
import React = require('react');
|
||||
import PageRenderer from '../../src/renderers/Page';
|
||||
import * as renderer from 'react-test-renderer';
|
||||
import {render, fireEvent, cleanup, waitFor} from '@testing-library/react';
|
||||
import '../../src';
|
||||
|
@ -850,7 +850,10 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
|
||||
const dispatcher = await this.dispatchEvent('success', {
|
||||
...file, // 保留历史结构
|
||||
item: file,
|
||||
item: {
|
||||
...file,
|
||||
...ret.data
|
||||
},
|
||||
value
|
||||
});
|
||||
if (dispatcher?.prevented) {
|
||||
|
@ -1120,7 +1120,10 @@ export default class ImageControl extends React.Component<
|
||||
|
||||
const dispatcher = await this.dispatchEvent('success', {
|
||||
...file, // 保留历史结构
|
||||
item: file,
|
||||
item: {
|
||||
...file,
|
||||
...ret.data
|
||||
},
|
||||
value: obj.value
|
||||
});
|
||||
if (dispatcher?.prevented) {
|
||||
|
Loading…
Reference in New Issue
Block a user