X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/295c7918a4ee45ca3e3df3e0a4adbb90e8c7434a..refs/pull/1462/head:/resources/assets/js/vues/attachment-manager.js diff --git a/resources/assets/js/vues/attachment-manager.js b/resources/assets/js/vues/attachment-manager.js index 16f96c70b..2467c646d 100644 --- a/resources/assets/js/vues/attachment-manager.js +++ b/resources/assets/js/vues/attachment-manager.js @@ -1,5 +1,5 @@ -const draggable = require('vuedraggable'); -const dropzone = require('./components/dropzone'); +import draggable from "vuedraggable"; +import dropzone from "./components/dropzone"; function mounted() { this.pageId = this.$el.getAttribute('page-id'); @@ -52,7 +52,9 @@ let methods = { }, deleteFile(file) { - if (!file.deleting) return file.deleting = true; + if (!file.deleting) { + return this.$set(file, 'deleting', true); + } this.$http.delete(window.baseUrl(`/attachments/${file.id}`)).then(resp => { this.$events.emit('success', resp.data.message); @@ -135,6 +137,6 @@ let methods = { }; -module.exports = { +export default { data, methods, mounted, components, }; \ No newline at end of file