|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import PropTypes from '../../_util/vue-types';
|
|
|
|
|
import BaseMixin from '../../_util/BaseMixin';
|
|
|
|
|
import partition from 'lodash/partition';
|
|
|
|
|
import classNames from 'classnames';
|
|
|
|
|
import defaultRequest from './request';
|
|
|
|
|
import getUid from './uid';
|
|
|
|
@ -74,10 +75,13 @@ const AjaxUploader = {
|
|
|
|
|
attrAccept(_file, this.accept),
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
const files = Array.prototype.slice
|
|
|
|
|
.call(e.dataTransfer.files)
|
|
|
|
|
.filter(file => attrAccept(file, this.accept));
|
|
|
|
|
this.uploadFiles(files);
|
|
|
|
|
const files = partition(Array.prototype.slice.call(e.dataTransfer.files), file =>
|
|
|
|
|
attrAccept(file, this.accept),
|
|
|
|
|
);
|
|
|
|
|
this.uploadFiles(files[0]);
|
|
|
|
|
if (files[1].length) {
|
|
|
|
|
this.$emit('reject', files[1]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
uploadFiles(files) {
|
|
|
|
|