async 的依赖改成依赖 async/mapLimit
This commit is contained in:
parent
eaa0fce092
commit
ff81c6b0c0
|
@ -22,7 +22,7 @@ const mapping: {
|
||||||
'amis': __moduleId('../src'),
|
'amis': __moduleId('../src'),
|
||||||
'amis/embed': __moduleId('./embed.tsx'),
|
'amis/embed': __moduleId('./embed.tsx'),
|
||||||
'prop-types': __moduleId('prop-types'),
|
'prop-types': __moduleId('prop-types'),
|
||||||
'async': __moduleId('async'),
|
'async/mapLimit': __moduleId('async/mapLimit'),
|
||||||
'qs': __moduleId('qs')
|
'qs': __moduleId('qs')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
&-itemInfoText {
|
&-itemInfoText {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
max-width: 180px;
|
max-width: 170px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -4,7 +4,8 @@ import cx from 'classnames';
|
||||||
import qs from 'qs';
|
import qs from 'qs';
|
||||||
import find from 'lodash/find';
|
import find from 'lodash/find';
|
||||||
import isPlainObject from 'lodash/isPlainObject';
|
import isPlainObject from 'lodash/isPlainObject';
|
||||||
import {mapLimit} from 'async';
|
// @ts-ignore
|
||||||
|
import mapLimit from 'async/mapLimit';
|
||||||
import ImageControl from './Image';
|
import ImageControl from './Image';
|
||||||
import {Payload, ApiObject, ApiString} from '../../types';
|
import {Payload, ApiObject, ApiString} from '../../types';
|
||||||
import {filter} from '../../utils/tpl';
|
import {filter} from '../../utils/tpl';
|
||||||
|
@ -718,8 +719,8 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||||
};
|
};
|
||||||
|
|
||||||
mapLimit(tasks, 3, uploadPartFile(state, config), function (
|
mapLimit(tasks, 3, uploadPartFile(state, config), function (
|
||||||
err,
|
err: any,
|
||||||
results
|
results: any
|
||||||
) {
|
) {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
|
Loading…
Reference in New Issue