File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -23,20 +23,21 @@ export default {
2323 dragLeave () {},
2424 drop (e ) {
2525 let status = true ;
26- if (e && e .dataTransfer .files ) {
27- e .dataTransfer .files .forEach ((file ) => {
26+ let files = Array .from (e .dataTransfer .files )
27+ if (e && files) {
28+ files .forEach ((file ) => {
2829 if (file .type .startsWith (" image" ) === false ) status = false ;
2930 });
3031 if (status == true ) {
3132 if (
3233 this .$props .max &&
33- e . dataTransfer . files .length + this .files .length > this .$props .max
34+ files .length + this .files .length > this .$props .max
3435 ) {
3536 this .error = this .$props .maxError
3637 ? this .$props .maxError
3738 : ` Maximum files is` + this .$props .max ;
3839 } else {
39- this .files .push (... e . dataTransfer . files );
40+ this .files .push (... files);
4041 this .previewImgs ();
4142 }
4243 } else {
You can’t perform that action at this time.
0 commit comments