mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-03 16:07:24 +00:00
30 lines
729 B
JavaScript
30 lines
729 B
JavaScript
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();
|
|
}
|
|
}
|