async 的依赖改成依赖 async/mapLimit

This commit is contained in:
2betop 2020-06-09 20:09:06 +08:00
parent eaa0fce092
commit ff81c6b0c0
3 changed files with 6 additions and 5 deletions

View File

@ -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')
}; };

View File

@ -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;

View File

@ -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);