forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.jsx
More file actions
29 lines (26 loc) · 729 Bytes
/
base.jsx
File metadata and controls
29 lines (26 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { Component } from 'react';
export default class Base extends Component {
/* istanbul ignore next */
abort(file) {
/* istanbul ignore next */
this.uploaderRef.abort(file);
}
/* istanbul ignore next */
startUpload() {
/* istanbul ignore next */
this.uploaderRef.startUpload();
}
saveUploaderRef = ref => {
/* istanbul ignore if */
if (ref && typeof ref.getInstance === 'function') {
this.uploaderRef = ref.getInstance();
} else {
this.uploaderRef = ref;
}
};
/* istanbul ignore next */
isUploading() {
/* istanbul ignore next */
return this.uploaderRef.isUploading();
}
}