function mounted() {
let container = this.$el;
let _this = this;
- new DropZone(container, {
+ this._dz = new DropZone(container, {
addRemoveLinks: true,
dictRemoveFile: trans('components.image_upload_remove'),
url: function() {
}
function data() {
- return {}
+ return {};
}
+const methods = {
+ onClose: function () {
+ this._dz.removeAllFiles(true);
+ }
+};
+
module.exports = {
template,
props,
mounted,
data,
+ methods
};